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

List of all members.

Public Member Functions

def __init__
def accept_connection
def challenge_response
def close
def write_message

Public Attributes

 challenge
 client_terminated
 server_terminated

Private Member Functions

def _calculate_part
def _generate_challenge_response
def _handle_challenge
def _handle_websocket_headers
def _on_end_delimiter
def _on_frame_type
def _on_length_indicator
def _receive_message
def _write_response

Private Attributes

 _waiting

Detailed Description

Implementation of the WebSockets protocol, version hixie-76.

This class provides basic functionality to process WebSockets requests as
specified in
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76

Definition at line 276 of file websocket.py.


Constructor & Destructor Documentation

def tornado.websocket.WebSocketProtocol76.__init__ (   self,
  handler 
)

Reimplemented from tornado.websocket.WebSocketProtocol.

Definition at line 283 of file websocket.py.


Member Function Documentation

def tornado.websocket.WebSocketProtocol76._calculate_part (   self,
  key 
) [private]
Processes the key headers and calculates their key value.

Raises ValueError when feed invalid key.

Definition at line 368 of file websocket.py.

def tornado.websocket.WebSocketProtocol76._generate_challenge_response (   self,
  part_1,
  part_2,
  part_3 
) [private]

Definition at line 380 of file websocket.py.

def tornado.websocket.WebSocketProtocol76._handle_challenge (   self,
  challenge 
) [private]

Definition at line 343 of file websocket.py.

Verifies all invariant- and required headers

If a header is missing or have an incorrect value ValueError will be
raised

Definition at line 357 of file websocket.py.

def tornado.websocket.WebSocketProtocol76._on_end_delimiter (   self,
  frame 
) [private]

Definition at line 399 of file websocket.py.

def tornado.websocket.WebSocketProtocol76._on_frame_type (   self,
  byte 
) [private]

Definition at line 390 of file websocket.py.

def tornado.websocket.WebSocketProtocol76._on_length_indicator (   self,
  byte 
) [private]

Definition at line 406 of file websocket.py.

Definition at line 387 of file websocket.py.

def tornado.websocket.WebSocketProtocol76._write_response (   self,
  challenge 
) [private]

Definition at line 352 of file websocket.py.

Definition at line 288 of file websocket.py.

Generates the challenge response that's needed in the handshake

The challenge parameter should be the raw bytes as sent from the
client.

Definition at line 328 of file websocket.py.

Closes the WebSocket connection.

Definition at line 423 of file websocket.py.

def tornado.websocket.WebSocketProtocol76.write_message (   self,
  message,
  binary = False 
)
Sends the given message to the client of this Web Socket.

Definition at line 413 of file websocket.py.


Member Data Documentation

Definition at line 283 of file websocket.py.

Definition at line 283 of file websocket.py.

Reimplemented from tornado.websocket.WebSocketProtocol.

Definition at line 406 of file websocket.py.

Reimplemented from tornado.websocket.WebSocketProtocol.

Definition at line 423 of file websocket.py.


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


roswww
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:30