Exemple #1
0
    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)
Exemple #2
0
    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] = {}
Exemple #3
0
 def connection_lost(self, exc):
     OTPProtocol.connection_lost(self, exc)
     self.service.remove_participant(self)
     self.post_remove()
Exemple #4
0
 def connection_made(self, transport):
     OTPProtocol.connection_made(self, transport)
Exemple #5
0
 def connection_lost(self, exc):
     OTPProtocol.connection_lost(self, exc)
     raise Exception('lost upsteam connection!', exc)
Exemple #6
0
 def connection_made(self, transport):
     OTPProtocol.connection_made(self, transport)
     self.service.on_upstream_connect()
Exemple #7
0
 def __init__(self, service):
     OTPProtocol.__init__(self, service)
     MDParticipant.__init__(self, service)
Exemple #8
0
    def __init__(self, service):
        OTPProtocol.__init__(self, service)
        MDParticipant.__init__(self, service)

        self.post_removes: List[Datagram] = []
Exemple #9
0
 def connection_made(self, transport):
     OTPProtocol.connection_made(self, transport)
     self.subscribe_channel(CLIENTS_CHANNEL)