コード例 #1
0
 def disconnect(self):
     if not self.__isConnected:
         return
     self.__isConnected = False
     self.__arenaChat.disconnect()
     self.__unitChat.disconnect()
     self.__voipProvider.leave()
     self.__voipCtrl.stop()
     self.__provider.setEnable(False)
     g_messengerEvents.onPluginDisconnected(PROTO_TYPE.BW_CHAT2)
コード例 #2
0
ファイル: __init__.py プロジェクト: kblw/wot_client
 def disconnect(self):
     if not self.__isConnected:
         return
     self.__isConnected = False
     self.__arenaChat.disconnect()
     self.__unitChat.disconnect()
     self.__clubChat.disconnect()
     self.__voipProvider.leave()
     self.__provider.setEnable(False)
     if self.__clubListener:
         self.__clubListener.stop()
         self.__clubListener = None
     g_messengerEvents.onPluginDisconnected(PROTO_TYPE.BW_CHAT2)
コード例 #3
0
ファイル: xmppconnection.py プロジェクト: aevitas/wotsdk
 def __handleDisconnect(self, reason, description):
     g_messengerEvents.onPluginDisconnected(PROTO_TYPE.XMPP)
     client = self.client()
     if not client:
         return
     g_logOutput.debug(CLIENT_LOG_AREA.CONNECTION, 'Client is disconnected')
     self.__cancelReconnectCallback()
     self.__cancelReqTokenCallback()
     if reason == DISCONNECT_REASON.AUTHENTICATION:
         self.__tokenRequester.clear()
     if self.isInGameServer() and reason != DISCONNECT_REASON.BY_REQUEST:
         delay = self.__connectionsInfo.getNextDelay()
         self.__reconnectCallbackID = BigWorld.callback(delay, self.__doNextConnect)
         g_logOutput.debug(CLIENT_LOG_AREA.CONNECTION, 'Will try to reconnect after {0} seconds'.format(delay), description)
         host, port = self.__connectionsInfo.getLastAddress()
         tries = self.__connectionsInfo.getTries()
         self.__invokeConnectFailedEvent(tries)
         sendEventToServer(XMPP_EVENT_LOG.DISCONNECT, host, port, reason, description, tries)
コード例 #4
0
 def __handleDisconnect(self, reason, description):
     g_messengerEvents.onPluginDisconnected(PROTO_TYPE.XMPP)
     client = self.client()
     if not client:
         return
     g_logOutput.debug(CLIENT_LOG_AREA.CONNECTION, 'Client is disconnected')
     self.__cancelReconnectCallback()
     self.__cancelReqTokenCallback()
     if reason == DISCONNECT_REASON.AUTHENTICATION:
         self.__tokenRequester.clear()
     if self.isInGameServer() and reason != DISCONNECT_REASON.BY_REQUEST:
         delay = self.__connectionsInfo.getNextDelay()
         self.__reconnectCallbackID = BigWorld.callback(delay, self.__doNextConnect)
         g_logOutput.debug(CLIENT_LOG_AREA.CONNECTION, 'Will try to reconnect after {0} seconds'.format(delay), description)
         host, port = self.__connectionsInfo.getLastAddress()
         tries = self.__connectionsInfo.getTries()
         g_messengerEvents.onPluginConnectFailed(PROTO_TYPE.XMPP, (host, port), tries)
         sendEventToServer(XMPP_EVENT_LOG.DISCONNECT, host, port, reason, description, tries)
コード例 #5
0
ファイル: plugin.py プロジェクト: webiumsk/WOT-0.9.15-CT
 def __onPluginDisconnected(self, protoType):
     if protoType == PROTO_TYPE.MIGRATION:
         return
     if g_settings.server.useToShowContacts(protoType):
         g_messengerEvents.onPluginDisconnected(PROTO_TYPE.MIGRATION)
コード例 #6
0
ファイル: plugin.py プロジェクト: mahmoudimus/WOT-0.9.20.0
 def __onPluginDisconnected(self, protoType):
     if protoType == PROTO_TYPE.MIGRATION:
         return
     if g_settings.server.useToShowContacts(protoType):
         g_messengerEvents.onPluginDisconnected(PROTO_TYPE.MIGRATION)
コード例 #7
0
ファイル: __init__.py プロジェクト: webiumsk/WOT0.10.0
 def disconnect(self):
     self.serviceChannel.clear()
     if self.__isConnected:
         self.clear()
         g_messengerEvents.onPluginDisconnected(PROTO_TYPE.BW)
コード例 #8
0
 def disconnect(self):
     self.serviceChannel.clear()
     if self.__isConnected:
         self.clear()
         g_messengerEvents.onPluginDisconnected(PROTO_TYPE.BW)