简体   繁体   中英

making IM program - am novice - how to connect to individual computer, not on LAN- using Python 3.2?

I was wondering if you could help me with some programming. I'm trying to write a chat program but i'm stuck. I can use LAN easily enough, but I cant do it over WAN / the Internet as an external IP-address only refers to the Lan/router. how can you connect to one computer in particular?

I'm trying to write in Python, but ive ran into a problem. i'm using a very basic client-server system using the socket module for both (so far).

The problem i'm having is that, while connecting over LAN is easy enough, i need to connect over the internet to one computer. This is because the external IP is only referring to the router. I know i could use probably port-forwarding but i was wondering if there was a way to reach the individual computer without the user manipulating router settings.

There's something called NAT Traversal . But it's not standard at all and there are may ways to do it, depending on the router vendor and other things. So it's a very complex thing to implement in a generic manner.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM