當前位置: 首頁>>代碼示例>>Python>>正文


Python netutil.TCPServer類代碼示例

本文整理匯總了Python中tornado.netutil.TCPServer的典型用法代碼示例。如果您正苦於以下問題:Python TCPServer類的具體用法?Python TCPServer怎麽用?Python TCPServer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TCPServer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

 def __init__(self, app, hostname, io_loop=None, ssl_options=None, **kwargs):
     log.warn('Graphite listener is started -- if you do not need graphite, turn it off in datadog.conf.')
     log.warn('Graphite relay uses pickle to transport messages. Pickle is not secured against remote execution exploits.')
     log.warn('See http://blog.nelhage.com/2011/03/exploiting-pickle/ for more details')
     self.app = app
     self.hostname = hostname
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
開發者ID:ghessler,項目名稱:dd-agent,代碼行數:7,代碼來源:graphite.py

示例2: __init__

 def __init__( self, request_callback, no_keep_alive = False, io_loop = None,
              xheaders = False, ssl_options = None, **kwargs ):
     self.request_callback = request_callback
     self.no_keep_alive = no_keep_alive
     self.xheaders = xheaders
     TCPServer.__init__( self, io_loop = io_loop, ssl_options = ssl_options,
                        **kwargs )
開發者ID:jjmason,項目名稱:tornado,代碼行數:7,代碼來源:httpserver.py

示例3: __init__

 def __init__(self, request_callback, io_loop=None, auth_password=None, **kwargs):
     self.request_callback = request_callback
     self.stats = Stats()
     self.auth_password = auth_password
     self.require_auth = False
     if self.auth_password:
         self.require_auth = True
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
開發者ID:glei,項目名稱:datafeed,代碼行數:8,代碼來源:server.py

示例4: __init__

 def __init__(self, request_callback, no_keep_alive=False, io_loop=None,
              xheaders=False, ssl_options=None, **kwargs):
     self.request_callback = request_callback
     self.no_keep_alive = no_keep_alive
     self.xheaders = xheaders
     self._events = dict(connect=None, data=None, end=None)
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options,
                        **kwargs)
開發者ID:raphaelmonrouzeau,項目名稱:tornado,代碼行數:8,代碼來源:httpserver.py

示例5: __init__

    def __init__(self, 
                cert_file, 
                key_file,
                **kwargs):

        TCPServer.__init__(self, 
                    ssl_options={"keyfile": key_file,
                                "certfile": cert_file}, 
                    **kwargs)
開發者ID:Ethan-Zhang,項目名稱:TestingServerForAPNs,代碼行數:9,代碼來源:APNsPushService.py

示例6: __init__

 def __init__(self, request_callback, protocol_conn, keep_alive=True, io_loop=None,
              ssl_options=None):
     """Initialize PServer with protocol specified by <protocol_connection>, and
     <request_callback> as na callable to handle requests objects (which is build by protocol_conn)
     """
     self.request_callback = request_callback
     self.protocol_conn = protocol_conn
     self.keep_alive = keep_alive
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options)
     logger.debug("PServer initialized")
開發者ID:robert-zaremba,項目名稱:tornado-pserver,代碼行數:10,代碼來源:base.py

示例7: __init__

    def __init__(self, 
                cert_file, 
                key_file,
                data_num, 
                **kwargs):

        self.data_num = data_num
        TCPServer.__init__(self, 
                    ssl_options={"keyfile": key_file,
                                "certfile": cert_file}, 
                    **kwargs)
開發者ID:Ethan-Zhang,項目名稱:TestingServerForAPNs,代碼行數:11,代碼來源:APNsFeedBackService.py

示例8: __init__

 def __init__(self, io_loop=None, ssl_options=None, **kwargs):
     logging.info('a reverse-proxy is started')
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
開發者ID:dnslj,項目名稱:python-labs,代碼行數:3,代碼來源:rproxy.py

示例9: __init__

 def __init__(self, io_loop=None, **kwargs):
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
開發者ID:kai0200,項目名稱:PythonST,代碼行數:2,代碼來源:tcp_server.py

示例10: __init__

 def __init__(self, io_loop=None, ssl_options=None, ank_accessor = None, **kwargs):
     logging.info('a echo tcp server is started')
     self.event_listeners = set([])
     self.ank_accessor = ank_accessor
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
開發者ID:ptokponnon,項目名稱:autonetkit,代碼行數:5,代碼來源:webserver.py

示例11: __init__

 def __init__(self, request_callback, io_loop=None, application=None, **kwargs):
     self.request_callback = request_callback
     self.application = application
     TCPServer.__init__(self, io_loop=io_loop, **kwargs)
開發者ID:dccmx,項目名稱:sniorfy,代碼行數:4,代碼來源:stpserver.py

示例12: listen

 def listen(self, port, address=""):
     TCPServer.listen(self, port, address)
     self.onListen(port)
開發者ID:richard-to,項目名稱:betelbot,代碼行數:3,代碼來源:jsonrpc.py

示例13: __init__

 def __init__(self, app, hostname, io_loop=None, ssl_options=None, **kwargs):
     log.info('Graphite listener is started')
     self.app = app
     self.hostname = hostname
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options, **kwargs)
開發者ID:CaptTofu,項目名稱:dd-agent,代碼行數:5,代碼來源:graphite.py

示例14: __init__

 def __init__(self,host='localhost',port=27019,backlog=1024,funcmapping={}):
     TCPServer.__init__(self)
     self.funcmapping = funcmapping
開發者ID:notedit,項目名稱:RunRpc,代碼行數:3,代碼來源:rpcserver.py

示例15: __init__

 def __init__(self, connection=JsonRpcConnection, io_loop=None, ssl_options=None, **kwargs):
     TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options)
     defaults = {JsonRpcServer.PARAM_ENCODER: Encoder(), JsonRpcServer.PARAM_IDINCREMENT: IdIncrement()}
     self.data = DictConfig(kwargs, defaults, False)
     self.connection = connection
     self.onInit(**kwargs)
開發者ID:richard-to,項目名稱:betelbot,代碼行數:6,代碼來源:jsonrpc.py


注:本文中的tornado.netutil.TCPServer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。