naptics / PlainPing

a very plain ping interface in swift
MIT License
60 stars 21 forks source link

Getting Ping Response in Main Thread ? #30

Open pulkitbabbar34 opened 3 years ago

pulkitbabbar34 commented 3 years ago

Hi, If I sending an IP address "172.20.10.5" to get the ping response i.e. Latency. This completion is getting called only in main thread. Is there any option that we can get the ping response in Background thread ?

Basically I'm defining a for loop to check the reachability of the IP's between 0-255, but I'm getting the response only in main thread.

Let me know if anybody knows the solution regarding this.

Thanks in advance !