def send(self, ID, Data): pkt = packet.construct(ID, Data) try: self.connection.send(pkt) return True except: return False
def send(self, id_, data): self.socket.send(packet.construct(id_, data))