Esempio n. 1
0
 def handle_stream(self, stream, address):
     context = _HTTPRequestContext(stream, address,
                                   self.protocol)
     conn = HTTP1ServerConnection(
         stream, self.conn_params, context)
     self._connections.add(conn)
     conn.start_serving(self)
Esempio n. 2
0
 def handle_stream(self, stream: iostream.IOStream, address: Tuple) -> None:
     context = _HTTPRequestContext(
         stream, address, self.protocol, self.trusted_downstream
     )
     conn = HTTP1ServerConnection(stream, self.conn_params, context)
     self._connections.add(conn)
     conn.start_serving(self)
Esempio n. 3
0
 def handle_stream(self, stream, address):
     # 请求的上下文,以属性字段的形式封装请求关联的数据
     context = _HTTPRequestContext(stream, address, self.protocol)
     # 支持 HTTP/1.x 的服务端持久化的连接对象, 作为 HTTPServerConnectionDelegate.start_request
     # 方法的 server_conn 实参。
     conn = HTTP1ServerConnection(stream, self.conn_params, context)
     self._connections.add(conn)
     conn.start_serving(self)