Make remote visible to outside world

I have to use socket.gethostname() to make the remote server available
to the outside world.
This commit is contained in:
Bryan Schumaker 2010-11-13 21:57:20 -05:00
parent 77e9cf13ee
commit d6d1c5f56c
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ def start_server():
# Set up a socket
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
server.bind(("localhost", 4242))
server.bind((socket.gethostname(), 4242))
except:
print "Could not open port 4242"
server.listen(5)