Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
tornado.http1connection.HTTP1Connection Class Reference
Inheritance diagram for tornado.http1connection.HTTP1Connection:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def close
def detach
def finish
def read_response
def set_body_timeout
def set_close_callback
def set_max_body_size
def write
def write_headers

Public Attributes

 context
 is_client
 no_keep_alive
 params
 stream

Private Member Functions

def _can_keep_alive
def _clear_callbacks
def _finish_request
def _format_chunk
def _on_connection_close
def _on_write_complete
def _parse_headers
def _read_body
def _read_body_until_close
def _read_chunked_body
def _read_fixed_body
def _read_message

Private Attributes

 _body_timeout
 _chunking_output
 _close_callback
 _disconnect_on_finish
 _expected_content_remaining
 _finish_future
 _max_body_size
 _pending_write
 _read_finished
 _request_headers
 _request_start_line
 _response_start_line
 _write_callback
 _write_finished
 _write_future

Detailed Description

Implements the HTTP/1.x protocol.

This class can be on its own for clients, or via `HTTP1ServerConnection`
for servers.

Definition at line 82 of file http1connection.py.


Constructor & Destructor Documentation

def tornado.http1connection.HTTP1Connection.__init__ (   self,
  stream,
  is_client,
  params = None,
  context = None 
)
:arg stream: an `.IOStream`
:arg bool is_client: client or server
:arg params: a `.HTTP1ConnectionParameters` instance or ``None``
:arg context: an opaque application-defined object that can be accessed
    as ``connection.context``.

Definition at line 88 of file http1connection.py.


Member Function Documentation

def tornado.http1connection.HTTP1Connection._can_keep_alive (   self,
  start_line,
  headers 
) [private]

Definition at line 461 of file http1connection.py.

Clears the callback attributes.

This allows the request handler to be garbage collected more
quickly in CPython by breaking up reference cycles.

Definition at line 259 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._finish_request (   self,
  future 
) [private]

Definition at line 474 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._format_chunk (   self,
  chunk 
) [private]

Definition at line 387 of file http1connection.py.

Definition at line 279 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._on_write_complete (   self,
  future 
) [private]

Definition at line 451 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._parse_headers (   self,
  data 
) [private]

Definition at line 485 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._read_body (   self,
  code,
  headers,
  delegate 
) [private]

Definition at line 497 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._read_body_until_close (   self,
  delegate 
) [private]

Definition at line 569 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._read_chunked_body (   self,
  delegate 
) [private]

Definition at line 545 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._read_fixed_body (   self,
  content_length,
  delegate 
) [private]

Definition at line 535 of file http1connection.py.

def tornado.http1connection.HTTP1Connection._read_message (   self,
  delegate 
) [private]

Definition at line 152 of file http1connection.py.

Definition at line 291 of file http1connection.py.

Take control of the underlying stream.

Returns the underlying `.IOStream` object and stops all further
HTTP processing.  May only be called during
`.HTTPMessageDelegate.headers_received`.  Intended for implementing
protocols like websockets that tunnel over an HTTP handshake.

Definition at line 298 of file http1connection.py.

Implements `.HTTPConnection.finish`.

Reimplemented from tornado.httputil.HTTPConnection.

Definition at line 422 of file http1connection.py.

Read a single HTTP response.

Typical client-mode usage is to write a request using `write_headers`,
`write`, and `finish`, and then call ``read_response``.

:arg delegate: a `.HTTPMessageDelegate`

Returns a `.Future` that resolves to None after the full response has
been read.

Definition at line 136 of file http1connection.py.

Sets the body timeout for a single request.

Overrides the value from `.HTTP1ConnectionParameters`.

Definition at line 311 of file http1connection.py.

Sets a callback that will be run when the connection is closed.

.. deprecated:: 4.0
    Use `.HTTPMessageDelegate.on_connection_close` instead.

Definition at line 271 of file http1connection.py.

def tornado.http1connection.HTTP1Connection.set_max_body_size (   self,
  max_body_size 
)
Sets the body size limit for a single request.

Overrides the value from `.HTTP1ConnectionParameters`.

Definition at line 318 of file http1connection.py.

def tornado.http1connection.HTTP1Connection.write (   self,
  chunk,
  callback = None 
)
Implements `.HTTPConnection.write`.

For backwards compatibility is is allowed but deprecated to
skip `write_headers` and instead call `write()` with a
pre-encoded header block.

Reimplemented from tornado.httputil.HTTPConnection.

Definition at line 402 of file http1connection.py.

def tornado.http1connection.HTTP1Connection.write_headers (   self,
  start_line,
  headers,
  chunk = None,
  callback = None 
)
Implements `.HTTPConnection.write_headers`.

Reimplemented from tornado.httputil.HTTPConnection.

Definition at line 325 of file http1connection.py.


Member Data Documentation

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 263 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 263 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 263 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.

Definition at line 94 of file http1connection.py.


The documentation for this class was generated from the following file:


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Wed Sep 13 2017 03:18:20