zuvola / flutter_icmp_ping

Flutter plugin that sends ICMP ECHO_REQUEST
MIT License
3 stars 9 forks source link

Version 2.0.0: Direct stream access + enable concurrent instances #1

Closed point-source closed 3 years ago

point-source commented 3 years ago

This is a significant API change but allows the user to directly access the PingData stream. It begins the ping when the stream is listened to and kills the process if the stream is closed/canceled.

The stop() method is now an instance method rather than a class method and together with the instance stream, allows a user to create multiple simultaneous ping sessions and control them individually. This is helpful when you are scanning a range of IPs at once.

zuvola commented 3 years ago

Thank you for the great PR. However, It seems that there is no summary output when ping is stopped with 'stop' method.

point-source commented 3 years ago

Oh good catch! I'll work on fixing that tomorrow. Thanks!

point-source commented 3 years ago

Alright, I fixed it for Android. Possibly fixed on iOS but also may not be due to a potential race condition. Not able to test the iOS side right now. Any chance you can take a look?

zuvola commented 3 years ago

It's perfect for Android. iOS needs a little change, so I'll merge and fix it. Thank you for your cooperation!