def connection_lost(self, exc): self.service.log.debug(f'Connection lost to client {self.channel}') OTPProtocol.connection_lost(self, exc) if self.avatar_id: self.delete_avatar_ram() self.service.remove_participant(self)
def __init__(self, service): OTPProtocol.__init__(self, service) MDParticipant.__init__(self, service) self.state: int = ClientState.NEW self.channel: int = service.new_channel_id() self.alloc_channel = self.channel self.subscribe_channel(self.channel) self.interests: List[Interest] = [] self.visible_objects: Dict[int, ObjectInfo] = {} self.owned_objects: Dict[int, ObjectInfo] = {} self.uberdogs: List[int] = [] self.account: Union[DISLAccount, None] = None self.avatar_id: int = 0 self.created_av_id: int = 0 self.wanted_name: str = '' self.potential_avatar = None self.potential_avatars: List[PotentialAvatar] = [] self.avs_deleted: List[Tuple[int, int]] = [] self.pending_objects: Dict[int, PendingObject] = {}
def connection_lost(self, exc): OTPProtocol.connection_lost(self, exc) self.service.remove_participant(self) self.post_remove()
def connection_made(self, transport): OTPProtocol.connection_made(self, transport)
def connection_lost(self, exc): OTPProtocol.connection_lost(self, exc) raise Exception('lost upsteam connection!', exc)
def connection_made(self, transport): OTPProtocol.connection_made(self, transport) self.service.on_upstream_connect()
def __init__(self, service): OTPProtocol.__init__(self, service) MDParticipant.__init__(self, service)
def __init__(self, service): OTPProtocol.__init__(self, service) MDParticipant.__init__(self, service) self.post_removes: List[Datagram] = []
def connection_made(self, transport): OTPProtocol.connection_made(self, transport) self.subscribe_channel(CLIENTS_CHANNEL)