Python Forum

Full Version: Networking Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone, i hope everyone is fine. This is not specifically a Python issue per se, however, I'm lacking a bit of networking understanding and am stuck with my Python project. The problem is as under.

I am trying to communicate between two machines using sockets over the internet(WAN).
I have enable port forwarding using UPNP and set the relevant forwarding e.g. 27.255.xx.xx --> 192.168.0.5 on port 7777 .
When i run one instance of my script which binds on 192.168.0.5 on port 7777 everything runs fine and i can connect from the second PC over WAN to the instance running on my machine .
I am confused of what will happen when the same script is run on another machine on my local network. I don't have another machine available with me at my home or i would've done some testing.
How will the computer sending the data on the other end differentiate between the two instances as the computer on the other end just connects on 27.255.xx.xx, 7777

Any help will be highly appreciated on explaining how the above will work. Any tutorials will also be appreciated dealing with the above situation. I have searched a bit online but can't find a reasonable explanation on how the above is supposed to work i.e. how to run two instances of the application bound to the same port on two local machines.

Kind Regards
iMu
Python.org (authors of python) ahve a good tutorial here