def __init__(self, *args, **kwargs): Channel.__init__(self, *args, **kwargs) self.id = str(self._server.NextId()) intid = int(self.id) self.color = [ (intid + 1) % 3 * 84, (intid + 2) % 3 * 84, (intid + 3) % 3 * 84 ] #tuple([randint(0, 127) for r in range(3)]) self.lines = []
def do_connect(self, address=None): if address: self.address = address try: Channel.__init__(self, map=self._map) self.create_socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) self.connect(self.address) except socket.gaierror as e: self.queue.append({"action": "error", "error": e.args}) except socket.error as e: self.queue.append({"action": "error", "error": e.args})
def __init__(self, *args, **kwargs): self.nickname = "anonymous" Channel.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): Channel.__init__(self, *args, **kwargs) self.count = 0 self.times = []