当前位置: 首页>>代码示例>>Python>>正文


Python TCPServer.__init__方法代码示例

本文整理汇总了Python中SocketServer.TCPServer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python TCPServer.__init__方法的具体用法?Python TCPServer.__init__怎么用?Python TCPServer.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SocketServer.TCPServer的用法示例。


在下文中一共展示了TCPServer.__init__方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, server_address, stop_event, RequestHandlerClass):
        HTTPServer.__init__(self, server_address, RequestHandlerClass)
        self._stop_event = stop_event
        self.auth_code = None 
开发者ID:OneDrive,项目名称:onedrive-sdk-python,代码行数:6,代码来源:GetAuthCodeServer.py

示例2: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, port, host='127.0.0.1', loglevel=logging.WARNING):
        logger.setLevel(loglevel)
        self.port = port
        TCPServer.__init__(self, (host, port), WebSocketHandler) 
开发者ID:geomagpy,项目名称:magpy,代码行数:6,代码来源:websocket_server.py

示例3: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, server_address):
        """Initialization of CacheTCPServer"""
        common.info('Constructing CacheTCPServer')
        TCPServer.__init__(self, server_address, NetflixHttpRequestHandler) 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:6,代码来源:http_server.py

示例4: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, server_address):
        """Initialization of MSLTCPServer"""
        common.info('Constructing NetflixTCPServer')
        self.netflix_session = NetflixSession()
        TCPServer.__init__(self, server_address, NetflixHttpRequestHandler) 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:7,代码来源:http_server.py

示例5: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, server_address):
        """Initialization of MSLTCPServer"""
        common.info('Constructing MSLTCPServer')
        self.msl_handler = MSLHandler()
        TCPServer.__init__(self, server_address, MSLHttpRequestHandler) 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:7,代码来源:http_server.py

示例6: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, port, host='127.0.0.1', loglevel=logging.WARNING):
        logger.setLevel(loglevel)
        TCPServer.__init__(self, (host, port), WebSocketHandler)
        self.port = self.socket.getsockname()[1] 
开发者ID:Pithikos,项目名称:python-websocket-server,代码行数:6,代码来源:websocket_server.py

示例7: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, content_object=None, content_provider_class=ContentProvider):
        self.content_provider = content_provider_class(content_object)
        TCPServer.__init__(self, ("127.0.0.1", 0), SFTPRequestHandler, False)
        Thread.__init__(self)
        self.daemon = True
        self._bound = Event() 
开发者ID:ulope,项目名称:pytest-sftpserver,代码行数:8,代码来源:server.py

示例8: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self):
        pass 
开发者ID:robotframework,项目名称:remoteswinglibrary,代码行数:4,代码来源:FileServer.py

示例9: start

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def start(self):
        TCPServer.__init__(self, ('localhost', int(HTTP_PORT)), CustomHandler)
        self.RESOURCE_LOCATION = path.abspath(path.dirname(__file__))
        print("Server serving from DocumentRoot:" + self.RESOURCE_LOCATION)
        chdir(self.RESOURCE_LOCATION)
        server_thread = threading.Thread(name='test_file_server', target=self.serve_forever)
        server_thread.daemon = True
        server_thread.start() 
开发者ID:robotframework,项目名称:remoteswinglibrary,代码行数:10,代码来源:FileServer.py

示例10: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, socket, local):
        telnetlib.Telnet.__init__(self)
        self.sock = socket
        self.remote = self.sock.fileno()
        self.local = local
        self.set_option_negotiation_callback(self.process_IAC) 
开发者ID:sassoftware,项目名称:conary,代码行数:8,代码来源:epdb_server.py

示例11: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, server_address, nx_common):
        """Initializes NetflixTCPServer"""
        nx_common.log(msg='Constructing netflixTCPServer')

        netflix_session = NetflixSession(
            cookie_path=nx_common.cookie_path,
            data_path=nx_common.data_path,
            verify_ssl=(nx_common.get_setting('ssl_verification') == 'true'),
            nx_common=nx_common)

        self.res_handler = NetflixHttpSubRessourceHandler(
            nx_common=nx_common,
            netflix_session=netflix_session)

        TCPServer.__init__(self, server_address, NetflixHttpRequestHandler) 
开发者ID:asciidisco,项目名称:plugin.video.netflix,代码行数:17,代码来源:NetflixHttpRequestHandler.py

示例12: __init__

# 需要导入模块: from SocketServer import TCPServer [as 别名]
# 或者: from SocketServer.TCPServer import __init__ [as 别名]
def __init__(self, server_address, nx_common):
        """Initialization of MSLTCPServer"""
        nx_common.log(msg='Constructing MSLTCPServer')
        self.nx_common = nx_common
        self.msl_handler = MSL(nx_common)
        TCPServer.__init__(self, server_address, MSLHttpRequestHandler) 
开发者ID:asciidisco,项目名称:plugin.video.netflix,代码行数:8,代码来源:MSLHttpRequestHandler.py


注:本文中的SocketServer.TCPServer.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。