I've been working with python's SocketServer.ThreadingTCPServer a bit and I'm having some difficulty making a publicly available server. Everything works fine when I set the server address as 'localhost'
self.server = SocketServer.ThreadingTCPServer(('localhost', constants.cmdport), Handler)
As long as the both the server and client are on the same computer and both specify 'localhost' the connections are made without a hitch. My program uses pystun to obtain my public ip. When I pass that public ip to the client and try to make a connection over the internet I get [errno 10061] No connection could be made..... as if the port was not opened. Both computers are behind the same router and subsequently have the same public ip, but I've read that the router will direct traffic to the computer with the open port. It seems almost all of the examples out there are for servers on the localhost. I'm sure there is a painfully simple answer, but I can't seem to find it. How do I establish a client/server connection via the real not just on the same computer. Thanks