webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
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) | |
Mimics mod_python mp_conn.
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.
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.
def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.get_local_addr | ( | self | ) |
Getter to mimic mp_conn.local_addr.
def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.get_memorized_lines | ( | self | ) |
Gets memorized lines. Not supported.
def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.get_remote_addr | ( | self | ) |
Getter to mimic mp_conn.remote_addr.
def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.on_write_data_done | ( | self | ) |
Called when sending data is completed.
def webkitpy.thirdparty.mod_pywebsocket.mux._LogicalConnection.on_writer_done | ( | self | ) |
Called by the mux handler when the writer thread has finished.
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.
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.
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.
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.
|
static |
|
static |
|
static |
|
static |
|
static |