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


Python http1connection.HTTP1ConnectionParameters方法代码示例

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


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

示例1: initialize

# 需要导入模块: from tornado import http1connection [as 别名]
# 或者: from tornado.http1connection import HTTP1ConnectionParameters [as 别名]
def initialize(self, request_callback, no_keep_alive=False, io_loop=None,
                   xheaders=False, ssl_options=None, protocol=None,
                   decompress_request=False,
                   chunk_size=None, max_header_size=None,
                   idle_connection_timeout=None, body_timeout=None,
                   max_body_size=None, max_buffer_size=None):
        self.request_callback = request_callback
        self.no_keep_alive = no_keep_alive
        self.xheaders = xheaders
        self.protocol = protocol
        self.conn_params = HTTP1ConnectionParameters(
            decompress=decompress_request,
            chunk_size=chunk_size,
            max_header_size=max_header_size,
            header_timeout=idle_connection_timeout or 3600,
            max_body_size=max_body_size,
            body_timeout=body_timeout)
        TCPServer.__init__(self, io_loop=io_loop, ssl_options=ssl_options,
                           max_buffer_size=max_buffer_size,
                           read_chunk_size=chunk_size)
        self._connections = set() 
开发者ID:tao12345666333,项目名称:tornado-zh,代码行数:23,代码来源:httpserver.py

示例2: initialize

# 需要导入模块: from tornado import http1connection [as 别名]
# 或者: from tornado.http1connection import HTTP1ConnectionParameters [as 别名]
def initialize(self, request_callback, no_keep_alive=False,
                   xheaders=False, ssl_options=None, protocol=None,
                   decompress_request=False,
                   chunk_size=None, max_header_size=None,
                   idle_connection_timeout=None, body_timeout=None,
                   max_body_size=None, max_buffer_size=None,
                   trusted_downstream=None):
        self.request_callback = request_callback
        self.xheaders = xheaders
        self.protocol = protocol
        self.conn_params = HTTP1ConnectionParameters(
            decompress=decompress_request,
            chunk_size=chunk_size,
            max_header_size=max_header_size,
            header_timeout=idle_connection_timeout or 3600,
            max_body_size=max_body_size,
            body_timeout=body_timeout,
            no_keep_alive=no_keep_alive)
        TCPServer.__init__(self, ssl_options=ssl_options,
                           max_buffer_size=max_buffer_size,
                           read_chunk_size=chunk_size)
        self._connections = set()
        self.trusted_downstream = trusted_downstream 
开发者ID:tp4a,项目名称:teleport,代码行数:25,代码来源:httpserver.py

示例3: initialize

# 需要导入模块: from tornado import http1connection [as 别名]
# 或者: from tornado.http1connection import HTTP1ConnectionParameters [as 别名]
def initialize(
        self,
        request_callback: Union[
            httputil.HTTPServerConnectionDelegate,
            Callable[[httputil.HTTPServerRequest], None],
        ],
        no_keep_alive: bool = False,
        xheaders: bool = False,
        ssl_options: Union[Dict[str, Any], ssl.SSLContext] = None,
        protocol: str = None,
        decompress_request: bool = False,
        chunk_size: int = None,
        max_header_size: int = None,
        idle_connection_timeout: float = None,
        body_timeout: float = None,
        max_body_size: int = None,
        max_buffer_size: int = None,
        trusted_downstream: List[str] = None,
    ) -> None:
        # This method's signature is not extracted with autodoc
        # because we want its arguments to appear on the class
        # constructor. When changing this signature, also update the
        # copy in httpserver.rst.
        self.request_callback = request_callback
        self.xheaders = xheaders
        self.protocol = protocol
        self.conn_params = HTTP1ConnectionParameters(
            decompress=decompress_request,
            chunk_size=chunk_size,
            max_header_size=max_header_size,
            header_timeout=idle_connection_timeout or 3600,
            max_body_size=max_body_size,
            body_timeout=body_timeout,
            no_keep_alive=no_keep_alive,
        )
        TCPServer.__init__(
            self,
            ssl_options=ssl_options,
            max_buffer_size=max_buffer_size,
            read_chunk_size=chunk_size,
        )
        self._connections = set()  # type: Set[HTTP1ServerConnection]
        self.trusted_downstream = trusted_downstream 
开发者ID:opendevops-cn,项目名称:opendevops,代码行数:45,代码来源:httpserver.py


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