def __init__(self,channel,startThread=False,portNumber=POLLING_SERVER_DEFAULT_PORT,hostname='localhost') : Router.__init__(self,channel) if (SocketRouter.acceptIncomingConnections) : from comm import Comm self.myComm = Comm() self.incomingTCP = Queue() # Variables for the state of the polling process self.setRunning(startThread) self.socketServer = None # Variables used to keep track of the data. self.incomingDataList = Queue() self.dataLock = threading.Lock() # Initialize the port number to use self.setPort(portNumber); self.setHostname(hostname) #socket.gethostname()) if(startThread) : if(SocketRouter.DEBUG) : print("Starting socket server") self.createAndInitializeSocket()
def __init__ (self, screen, x, y): Router.__init__(self, screen, x, y) self.color = (191, 96, 96) self.packetColor = (191, 128, 128) self.font = pygame.font.Font(None, 24) self.names = {}
def __init__ (self, screen, x, y): Router.__init__(self, screen, x, y) self.selectable = False