0

i have created an app that uses wifi of a laptop ,if user is not connected to wifi then it will not let them to use it, currently I am using while true with some socket.gethostbyname function , i want to avoid that while true loop for Realtime checking ,how can i do this ?

s Hegade
  • 21
  • 5
  • Should it be specifically be connected to the wifi or be connected to the internet? For internet you can ping a server to check if you're still online, for wifi hardware maybe this [link](https://stackoverflow.com/questions/57093853/detecting-available-network-adapters-with-python) will help – clamentjohn Jul 04 '21 at 06:38
  • just to wifi not to internet –  s Hegade Jul 04 '21 at 06:59
  • actually my app is working fine but ,i'm using while True to determine whether the user is connected to wifi or not (meaning connecting some other hotspot using laptop's wifi),but i need to get rid of while True,how can i do that –  s Hegade Jul 04 '21 at 07:02

0 Answers0