From 3fea4e5ee5d705c1234a47717b39fc56f1a46456 Mon Sep 17 00:00:00 2001 From: Sana147 <14mseeshabib@seecs.edu.pk> Date: Mon, 1 May 2023 23:48:02 +0000 Subject: [PATCH] Update 'server/NetGenieSrv.py' --- server/NetGenieSrv.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/NetGenieSrv.py b/server/NetGenieSrv.py index 504d755..6cc24a5 100644 --- a/server/NetGenieSrv.py +++ b/server/NetGenieSrv.py @@ -4,17 +4,21 @@ import socket; import sys; def init_socket(): - # Create a TCP/IP socket + # Creates a TCP/IP socket # socket type .AF_INET is the Internet address family for IPv4. # .SOCK_STREAM is the socket type for TCP. - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + debug_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Bind the socket to the port 8000 - server_address = ('localhost', 8000) - sock.bind(server_address) + debug_server_address = ('localhost', 8000) + sock.bind(debug_server_address) # Listen for incoming connections sock.listen(1) + while True: + # Wait for a connection + print >>sys.stderr, 'Waiting for a Connection' + connection, client_address = sock.accept() def check_bridge_socket(): evt = None