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

List of all members.

Public Member Functions

def __init__
def close
def headers_received
def on_connection_close
def on_message
def on_pong
def read_message
def write_message

Public Attributes

 connect_future
 final_callback
 headers
 key
 protocol
 read_future
 read_queue
 stream
 tcp_client

Private Member Functions

def _on_http_response

Private Attributes

 _timeout

Detailed Description

WebSocket client connection.

This class should not be instantiated directly; use the
`websocket_connect` function instead.

Definition at line 661 of file websocket.py.


Constructor & Destructor Documentation

def tornado.websocket.WebSocketClientConnection.__init__ (   self,
  io_loop,
  request 
)

Definition at line 667 of file websocket.py.


Member Function Documentation

def tornado.websocket.WebSocketClientConnection._on_http_response (   self,
  response 
) [private]

Definition at line 711 of file websocket.py.

def tornado.websocket.WebSocketClientConnection.close (   self,
  code = None,
  reason = None 
)
Closes the websocket connection.

``code`` and ``reason`` are documented under
`WebSocketHandler.close`.

.. versionadded:: 3.2

.. versionchanged:: 4.0

   Added the ``code`` and ``reason`` arguments.

Definition at line 688 of file websocket.py.

def tornado.websocket.WebSocketClientConnection.headers_received (   self,
  start_line,
  headers 
)
Called when the HTTP headers have been received and parsed.

:arg start_line: a `.RequestStartLine` or `.ResponseStartLine`
    depending on whether this is a client or server message.
:arg headers: a `.HTTPHeaders` instance.

Some `.HTTPConnection` methods can only be called during
``headers_received``.

May return a `.Future`; if it does the body will not be read
until it is done.

Reimplemented from tornado.simple_httpclient._HTTPConnection.

Definition at line 719 of file websocket.py.

Called if the connection is closed without finishing the request.

If ``headers_received`` is called, either ``finish`` or
``on_connection_close`` will be called, but not both.

Reimplemented from tornado.simple_httpclient._HTTPConnection.

Definition at line 704 of file websocket.py.

Definition at line 769 of file websocket.py.

Definition at line 776 of file websocket.py.

def tornado.websocket.WebSocketClientConnection.read_message (   self,
  callback = None 
)
Reads a message from the WebSocket server.

Returns a future whose result is the message, or None
if the connection is closed.  If a callback argument
is given it will be called with the future when it is
ready.

Definition at line 751 of file websocket.py.

def tornado.websocket.WebSocketClientConnection.write_message (   self,
  message,
  binary = False 
)
Sends a message to the WebSocket server.

Definition at line 747 of file websocket.py.


Member Data Documentation

Reimplemented from tornado.simple_httpclient._HTTPConnection.

Definition at line 719 of file websocket.py.

Definition at line 667 of file websocket.py.

Reimplemented from tornado.simple_httpclient._HTTPConnection.

Definition at line 719 of file websocket.py.

Reimplemented from tornado.simple_httpclient._HTTPConnection.

Definition at line 719 of file websocket.py.

Definition at line 667 of file websocket.py.

Definition at line 698 of file websocket.py.

Definition at line 667 of file websocket.py.

Definition at line 667 of file websocket.py.

Reimplemented from tornado.simple_httpclient._HTTPConnection.

Definition at line 719 of file websocket.py.

Reimplemented from tornado.simple_httpclient._HTTPConnection.

Definition at line 667 of file websocket.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:21