def send_message(self, host, port, message):
        peer_key = (host, port)
        if peer_key in self._contacts:
            protocol = self._contacts[peer_key]
            protocol.sendMessage(message)
            return
        d = defer.Deferred()
        # open network call.
        client_string = 'tcp:%s:%d' % (host, port)
        client = clientFromString(reactor, client_string)
        connection = client.connect(MessageFactory(self))
        # Ensure the connection attempt will time out after 5 seconds.
        connection_timeout = reactor.callLater(5, connection.cancel)

        def on_connect(protocol):
            # Cancel pending connection_timeout if it's still active.
            if connection_timeout.active():
                connection_timeout.cancel()
            self._contacts[peer_key] = protocol
            # Send the message
            protocol.sendMessage(message)

        def on_error(error):
            d.errback(error)

        connection.addCallback(on_connect)
        connection.addErrback(on_error)
Sends a message to the specified contact, adds it to the _pending
dataset/ETHPy150Open hpk42/p4p/friendsecure/node.py/Node.send_message