示例#1
0
文件: server.py 项目: xLegoz/fabric
    def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True):
        # Prevent "address already in use" errors when running tests 2x in a
        # row.
        self.allow_reuse_address = True

        # Handle network family/host addr (see docstring for _socket_info)
        family, addr = self._socket_info(server_address)
        self.address_family = family
        TCPServer.__init__(self, addr, RequestHandlerClass, bind_and_activate)
示例#2
0
文件: server.py 项目: disqus/fabric
    def __init__(self,
                 server_address,
                 RequestHandlerClass,
                 bind_and_activate=True):
        # Prevent "address already in use" errors when running tests 2x in a
        # row.
        self.allow_reuse_address = True

        # Handle network family/host addr (see docstring for _socket_info)
        family, addr = self._socket_info(server_address)
        self.address_family = family
        TCPServer.__init__(self, addr, RequestHandlerClass, bind_and_activate)