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