How can I send files remotely between computers using Python sockets?

58 Views Asked by At

Background I have an intermediate level of experience with Python, but am relatively new to networking. I've seen a few related questions on this forum but haven't quite found a solution that makes sense to me.

My Objective I'd like to use sockets to send files from one computer to another using TCP, where both computers are on different Wi-Fi networks. I can do so on the same network quite easily using the server computer's IP address and a common port number, but I understand that things become more complex once you want to connect to a computer outside your LAN.

My Problem From my reading, it sounds like I'll need to use port forwarding to allow this to happen. Beyond port forwarding however, I am unclear what I need to do to connect computers. Across the same network, I can use an IP address and a port number. Across different networks, there are many computers with the same IP address so what would I use in place of an IP address?

Any examples in python using the socket module would be a big help to me. Thank you!!

0

There are 0 best solutions below