From 2bda1c27c46d7f575a38e03cfe6033e2ff15d51b Mon Sep 17 00:00:00 2001 From: Sana147 <14mseeshabib@seecs.edu.pk> Date: Mon, 1 May 2023 23:24:07 +0000 Subject: [PATCH] Update 'server/NetGenieSrv.py' --- server/NetGenieSrv.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/NetGenieSrv.py b/server/NetGenieSrv.py index 05dd89e..9bba69a 100644 --- a/server/NetGenieSrv.py +++ b/server/NetGenieSrv.py @@ -7,6 +7,13 @@ def init_socket(): # Create a TCP/IP socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + # Bind the socket to the port + server_address = ('localhost', 8000) + sock.bind(server_address) + + # Listen for incoming connections + sock.listen(1) + def check_bridge_socket(): evt = None return evt