def start(self): from twisted.internet.defer import Deferred from transport import callback from main import events from main import listeners from p2p import online_status from p2p import p2p_service from p2p import p2p_connector from p2p import network_connector from p2p import ratings p2p_service.init() online_status.init() ratings.init() self._starting_defer = Deferred() p2p_connector.A('init') p2p_connector.A().addStateChangedCallback( self._on_p2p_connector_switched) network_connector.A().addStateChangedCallback( self._on_network_connector_switched) callback.append_inbox_callback(self._on_inbox_packet_received) callback.append_inbox_callback(p2p_service.inbox) events.add_subscriber(self._on_identity_url_changed, 'identity-url-changed') events.add_subscriber(self._on_my_identity_url_changed, 'my-identity-url-changed') if listeners.is_populate_requered('online_status'): listeners.populate_later().remove('online_status') online_status.populate_online_statuses() return True
def start(self): from p2p import p2p_service from p2p import contact_status from p2p import p2p_connector from p2p import network_connector from twisted.internet.defer import Deferred p2p_service.init() contact_status.init() self._starting_defer = Deferred() p2p_connector.A('init') p2p_connector.A().addStateChangedCallback( self._on_p2p_connector_switched) network_connector.A().addStateChangedCallback( self._on_network_connector_switched) return True
def start(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 from twisted.internet.defer import Deferred p2p_service.init() contact_status.init() self._starting_defer = Deferred() p2p_connector.A('init') p2p_connector.A().addStateChangedCallback( self._on_p2p_connector_switched) network_connector.A().addStateChangedCallback( self._on_network_connector_switched) callback.append_inbox_callback(self._on_inbox_packet_received) callback.append_inbox_callback(p2p_service.inbox) return True