def stop(self): from p2p import p2p_service from p2p import contact_status from p2p import p2p_connector from p2p import network_connector if network_connector.A(): network_connector.A().removeStateChangedCallback( self._on_network_connector_switched) p2p_connector.A().removeStateChangedCallback( self._on_p2p_connector_switched) contact_status.shutdown() p2p_connector.Destroy() p2p_service.shutdown() return True
def stop(self): from transport import callback from p2p import contact_status from p2p import p2p_service from p2p import p2p_connector from p2p import network_connector callback.remove_inbox_callback(self._on_inbox_packet_received) callback.remove_inbox_callback(p2p_service.inbox) if network_connector.A(): network_connector.A().removeStateChangedCallback( self._on_network_connector_switched) p2p_connector.A().removeStateChangedCallback( self._on_p2p_connector_switched) contact_status.shutdown() p2p_connector.Destroy() p2p_service.shutdown() return True
def stop(self): from transport import callback from main import events from p2p import online_status from p2p import p2p_service from p2p import p2p_connector from p2p import network_connector from p2p import ratings events.remove_subscriber(self._on_my_identity_url_changed, 'my-identity-url-changed') events.remove_subscriber(self._on_identity_url_changed, 'identity-url-changed') callback.remove_inbox_callback(self._on_inbox_packet_received) callback.remove_inbox_callback(p2p_service.inbox) if network_connector.A(): network_connector.A().removeStateChangedCallback( self._on_network_connector_switched) p2p_connector.A().removeStateChangedCallback( self._on_p2p_connector_switched) ratings.shutdown() online_status.shutdown() p2p_connector.Destroy() p2p_service.shutdown() return True