當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。