tsproxy.py 文件源码

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

项目:tsproxy 作者: WPO-Foundation 项目源码 文件源码
def __init__(self, host, port):
    asyncore.dispatcher.__init__(self)
    self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
      #self.set_reuse_addr()
      self.bind((host, port))
      self.listen(socket.SOMAXCONN)
      self.ipaddr, self.port = self.getsockname()
      self.current_client_id = 0
    except:
      PrintMessage("Unable to listen on {0}:{1}. Is the port already in use?".format(host, port))
      exit(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号