def __init__(self, connection): threading.Thread.__init__(self) self.connection = connection connections.append(self.connection) self.connected = True print("Connection made") self.username = ""
def server_loop(self): while self.is_listening: try: sock, addr = self.server_proc.accept() print("Recieved new connection from {}.".format(addr)) connections.append(sock) handler = RequestHandler(sock) handler.start() except socket.error: print("Benign connection abort error thrown.") break;
def server_loop(self): while self.is_listening: try: sock, addr = self.server_proc.accept() print("Recieved new connection from {}.".format(addr)) # TODO: Change request handler call to pass in the certificate mode connections.append( sock ) #append to dictionary and log whether they are logged in handler = RequestHandler(sock) handler.start() except socket.error: print("Benign connection abort error thrown.") break