webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Static Public Attributes | Properties | List of all members
webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection Class Reference
Inheritance diagram for webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection:

Public Member Functions

def __init__ (self, mux_handler, channel_id)
 
def get_local_addr (self)
 
def get_remote_addr (self)
 
def get_memorized_lines (self)
 
def write (self, data)
 
def write_control_data (self, data)
 
def on_write_data_done (self)
 
def on_writer_done (self)
 
def append_frame_data (self, frame_data)
 
def read (self, length)
 
def set_read_state (self, new_state)
 

Static Public Attributes

 STATE_ACTIVE
 
 STATE_GRACEFULLY_CLOSED
 
 STATE_TERMINATED
 

Properties

 local_addr = property(get_local_addr)
 
 remote_addr = property(get_remote_addr)
 

Detailed Description

Mimics mod_python mp_conn.

Constructor & Destructor Documentation

◆ __init__()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.__init__ (   self,
  mux_handler,
  channel_id 
)
Constructs an instance.

Args:
    mux_handler: _MuxHandler instance.
    channel_id: channel id of this connection.

Member Function Documentation

◆ append_frame_data()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.append_frame_data (   self,
  frame_data 
)
Appends incoming frame data. Called when mux_handler dispatches
frame data to the corresponding application.

Args:
    frame_data: incoming frame data.

◆ get_local_addr()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.get_local_addr (   self)
Getter to mimic mp_conn.local_addr.

◆ get_memorized_lines()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.get_memorized_lines (   self)
Gets memorized lines. Not supported.

◆ get_remote_addr()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.get_remote_addr (   self)
Getter to mimic mp_conn.remote_addr.

◆ on_write_data_done()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.on_write_data_done (   self)
Called when sending data is completed.

◆ on_writer_done()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.on_writer_done (   self)
Called by the mux handler when the writer thread has finished.

◆ read()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.read (   self,
  length 
)
Reads data. Blocks until enough data has arrived via physical
connection.

Args:
    length: length of data to be read.
Raises:
    LogicalConnectionClosedException: when closing handshake for this
logical channel has been received.
    ConnectionTerminatedException: when the physical connection has
closed, or an error is caused on the reader thread.

◆ set_read_state()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.set_read_state (   self,
  new_state 
)
Sets the state of this connection. Called when an event for this
connection has occurred.

Args:
    new_state: state to be set. new_state must be one of followings:
    - STATE_GRACEFULLY_CLOSED: when closing handshake for this
connection has been received.
    - STATE_TERMINATED: when the physical connection has closed or
DropChannel of this connection has received.

◆ write()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.write (   self,
  data 
)
Writes data. mux_handler sends data asynchronously. The caller will
be suspended until write done.

Args:
    data: data to be written.

Raises:
    MuxUnexpectedException: when called before finishing the previous
write.

◆ write_control_data()

def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.write_control_data (   self,
  data 
)
Writes data via the control channel. Don't wait finishing write
because this method can be called by mux dispatcher.

Args:
    data: data to be written.

Member Data Documentation

◆ STATE_ACTIVE

webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.STATE_ACTIVE
static

◆ STATE_GRACEFULLY_CLOSED

webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.STATE_GRACEFULLY_CLOSED
static

◆ STATE_TERMINATED

webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.STATE_TERMINATED
static

Property Documentation

◆ local_addr

webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.local_addr = property(get_local_addr)
static

◆ remote_addr

webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.remote_addr = property(get_remote_addr)
static

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