onion_transport.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:txmix 作者: applied-mixnetworks 项目源码 文件源码
def do_send(self, addr, message):
        """
        send message to addr
        where addr is a 2-tuple of type: (onion host, onion port)
        """
        onion_host, onion_port = addr
        tor_endpoint = self.tor.stream_via(onion_host, onion_port)
        send_message_protocol = Int32StringReceiver()
        self.remote_mix_protocol = yield endpoints.connectProtocol(tor_endpoint, send_message_protocol)
        self.remote_mix_protocol.sendString(message)
        self.remote_mix_protocol.transport.loseConnection()

    # Protocol parent method overwriting
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号