forked from beau/relab
Update 'server/NetGenieSrv.py'
This commit is contained in:
parent
3fea4e5ee5
commit
e625775088
@ -7,18 +7,18 @@ def init_socket():
|
|||||||
# Creates a TCP/IP socket
|
# Creates a TCP/IP socket
|
||||||
# socket type .AF_INET is the Internet address family for IPv4.
|
# socket type .AF_INET is the Internet address family for IPv4.
|
||||||
# .SOCK_STREAM is the socket type for TCP.
|
# .SOCK_STREAM is the socket type for TCP.
|
||||||
debug_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
debug_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|
||||||
# Bind the socket to the port 8000
|
# Bind the socket to the port 8000
|
||||||
debug_server_address = ('localhost', 8000)
|
debug_server_address = ('localhost', 8000)
|
||||||
sock.bind(debug_server_address)
|
debug_socket.bind(debug_server_address)
|
||||||
|
|
||||||
# Listen for incoming connections
|
# Listen for incoming connections
|
||||||
sock.listen(1)
|
debug_socket.listen(1)
|
||||||
while True:
|
while True:
|
||||||
# Wait for a connection
|
# Wait for a connection
|
||||||
print >>sys.stderr, 'Waiting for a Connection'
|
print >>sys.stderr, 'Waiting for a Connection'
|
||||||
connection, client_address = sock.accept()
|
connection, client_address = debug_socket.accept()
|
||||||
|
|
||||||
def check_bridge_socket():
|
def check_bridge_socket():
|
||||||
evt = None
|
evt = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user