0

How can we send data from one device to another device by internet using python? I know python has a socket module for transmission of data, but we can do it only if our both computers are connected to each other using wifi/hotspot. I want to send data to a node which is not connected to any wifi but having an active internet. Which module is best for doing this? Can it be done using socket module?

Don't suggest this code as it works only if your nodes are already connected to eachother by wifi/hotspot: Talking about this code

And if my knowledge about socket module is incorrect please help me. Thanks in advance for helping me out!

  • Using sockets. Using [this code](https://stackoverflow.com/questions/5971510/easiest-way-to-transfer-data-over-the-internet-python). But your ISP breaks your Internet connection on purpose and you have to set up "port forwarding" to make it work properly. So look that up. Perhaps if your ISP uses "CGNAT" then it's impossible to make it work, except with IPv6. Do both computers have IPv6? – user253751 May 03 '22 at 09:52
  • Yes both have IPv6. – Piyush Singh May 05 '22 at 15:15
  • Then you might find it convenient to use IPv6 sockets and then you will not need to worry about port forwarding. – user253751 May 05 '22 at 15:22
  • Can you please share the code, as I didn't understood very well what you are saying... I will understand more better if you share a code as an example about which you are talking about... – Piyush Singh May 05 '22 at 20:19

0 Answers0