-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from osociety/dev
Prepare release v1.0.1
- Loading branch information
Showing
11 changed files
with
224 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Change Log | ||
|
||
## 1.0.1 | ||
|
||
* Bug fixes and improvements, add more tests for coverage | ||
|
||
## 1.0.0 | ||
|
||
* Initial support added for ping_ios_dart in network_tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'package:logging/logging.dart'; | ||
import 'package:network_tools/network_tools.dart'; | ||
import 'package:network_tools_flutter/network_tools_flutter.dart'; | ||
|
||
void main() { | ||
// Logger.root.level = Level.FINE; | ||
// Logger.root.onRecord.listen((record) { | ||
// print( | ||
// '${DateFormat.Hms().format(record.time)}: ${record.level.name}: ${record.loggerName}: ${record.message}', | ||
// ); | ||
// }); | ||
final log = Logger("host_scan_example"); | ||
|
||
const String address = '192.168.1.1'; | ||
// or You can also get address using network_info_plus package | ||
// final String? address = await (NetworkInfo().getWifiIP()); | ||
final String subnet = address.substring(0, address.lastIndexOf('.')); | ||
|
||
// You can set [firstHostId] and scan will start from this host in the network. | ||
// Similarly set [lastHostId] and scan will end at this host in the network. | ||
final stream = HostScannerFlutter.getAllPingableDevices( | ||
subnet, | ||
// firstHostId: 1, | ||
// lastHostId: 254, | ||
progressCallback: (progress) { | ||
log.finer('Progress for host discovery : $progress'); | ||
}, | ||
); | ||
|
||
stream.listen( | ||
(ActiveHost host) async { | ||
//Same host can be emitted multiple times | ||
//Use Set<ActiveHost> instead of List<ActiveHost> | ||
log.fine('Found device: ${await host.toStringFull()}'); | ||
}, | ||
onDone: () { | ||
log.fine('Scan completed'); | ||
}, | ||
); // Don't forget to cancel the stream when not in use. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
library network_tools_flutter; | ||
|
||
export 'src/host_scanner_flutter.dart'; | ||
export 'src/port_scanner_flutter.dart'; | ||
export 'src/port_scanner_flutter.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.