def __init__(self, client: SocketStream): self.client = client self.do_loop = True self.protocol_state = "init" self.protocol_version = packets.default_protocol_version self.messages: List[bytes] = [] self._locks: List[ Dict[str, Union[ str, Event, Optional[AnyBuffer] ]] ] = [] self.server_id = make_server_id() self.verify_token = make_verify_token() self.cipher = Cipher() self.display_name = "" self.uuid: UUID = None
def __init__(self, factory, remote_addr): Protocol.__init__(self, factory, remote_addr) self.server_id = crypto.make_server_id() self.verify_token = crypto.make_verify_token()