pysyncobj/transport.py
def _onOutgoingMessageReceived(self, conn, message):
        """
        Callback for receiving a message on a new outgoing connection. Used only if encryption is enabled to exchange the random keys.
        Once the key exchange is done, this triggers the onNodeConnected callback, and further messages are deferred to the onMessageReceived callback.

        :param conn: connection object
        :type conn: TcpConnection
        :param message: received message
        :type message: any
        """

        if not conn.sendRandKey:
            conn.sendRandKey = message
            conn.send(self._selfNode.address)

        node = self._connToNode(conn)
        conn.setOnMessageReceivedCallback(functools.partial(self._onMessageReceived, node))
        self._onNodeConnected(node)
def _onOutgoingMessageReceived(self, conn, message):
        if not conn.sendRandKey:
            conn.sendRandKey = message
            conn.send(self._selfNode.address)

        node = self._connToNode(conn)
        conn.setOnMessageReceivedCallback(functools.partial(self._onMessageReceived, node))
        self._onNodeConnected(node)
def _onOutgoingMessageReceived ( self , conn , message ) : if not conn . sendRandKey : conn . sendRandKey = message conn . send ( self . _selfNode . address ) node = self . _connToNode ( conn ) conn . setOnMessageReceivedCallback ( functools . partial ( self . _onMessageReceived , node ) ) self . _onNodeConnected ( node )
Callback for receiving a message on a new outgoing connection. Used only if encryption is enabled to exchange the random keys.
        Once the key exchange is done, this triggers the onNodeConnected callback, and further messages are deferred to the onMessageReceived callback.

        :param conn: connection object
        :type conn: TcpConnection
        :param message: received message
        :type message: any
Callback for receiving a message on a new outgoing connection . Used only if encryption is enabled to exchange the random keys . Once the key exchange is done this triggers the onNodeConnected callback and further messages are deferred to the onMessageReceived callback .