tcp_proxy.py 文件源码

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

项目:TigerHost 作者: naphatkrit 项目源码 文件源码
def __init__(self, server_queue, client_queue):
        """Create a new protocol.

        :code:`server_queue` and :code:`client_queue` corresponds to the variables
        in the TCP proxy.

        :code:`self.wait_queue` is used to handle the race condition where
        :code:`self.client_queue` is ready to be consumed, but the connection has
        not been established.

        :param DeferredQueue server_queue:
        :param DeferredQueue client_queue:
        """
        self.server_queue = server_queue
        self.client_queue = client_queue
        self.wait_queue = DeferredQueue()
        self.client_queue.get().addCallback(self.clientQueueCallback)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号