Bind remote server by ip address
This should worke better than binding by hostname or 'localhost'
This commit is contained in:
parent
d6d1c5f56c
commit
ee8106e373
|
@ -88,7 +88,9 @@ 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((socket.gethostname(), 4242))
|
ip = socket.gethostbyname(socket.gethostname())
|
||||||
|
print "Remote server binding to: %s" % ip
|
||||||
|
server.bind((ip, 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