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:
parent
77e9cf13ee
commit
d6d1c5f56c
|
@ -88,7 +88,7 @@ def start_server():
|
||||||
# Set up a socket
|
# Set up a socket
|
||||||
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
try:
|
try:
|
||||||
server.bind(("localhost", 4242))
|
server.bind((socket.gethostname(), 4242))
|
||||||
except:
|
except:
|
||||||
print "Could not open port 4242"
|
print "Could not open port 4242"
|
||||||
server.listen(5)
|
server.listen(5)
|
||||||
|
|
Loading…
Reference in New Issue