webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Classes | |
class | FragmentedFrameBuilder |
class | Frame |
class | Stream |
class | StreamOptions |
Functions | |
def | create_length_header (length, mask) |
def | create_header (opcode, payload_length, fin, rsv1, rsv2, rsv3, mask) |
def | create_binary_frame (message, opcode=common.OPCODE_BINARY, fin=1, mask=False, frame_filters=[]) |
def | create_text_frame (message, opcode=common.OPCODE_TEXT, fin=1, mask=False, frame_filters=[]) |
def | parse_frame (receive_bytes, logger=None, ws_version=common.VERSION_HYBI_LATEST, unmask_receive=True) |
def | create_ping_frame (body, mask=False, frame_filters=[]) |
def | create_pong_frame (body, mask=False, frame_filters=[]) |
def | create_close_frame (body, mask=False, frame_filters=[]) |
def | create_closing_handshake_body (code, reason) |
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_binary_frame | ( | message, | |
opcode = common.OPCODE_BINARY , |
|||
fin = 1 , |
|||
mask = False , |
|||
frame_filters = [] |
|||
) |
Creates a simple binary frame with no extension, reserved bit.
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_close_frame | ( | body, | |
mask = False , |
|||
frame_filters = [] |
|||
) |
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_closing_handshake_body | ( | code, | |
reason | |||
) |
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_header | ( | opcode, | |
payload_length, | |||
fin, | |||
rsv1, | |||
rsv2, | |||
rsv3, | |||
mask | |||
) |
Creates a frame header. Raises: Exception: when bad data is given.
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_length_header | ( | length, | |
mask | |||
) |
Creates a length header. Args: length: Frame length. Must be less than 2^63. mask: Mask bit. Must be boolean. Raises: ValueError: when bad data is given.
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_ping_frame | ( | body, | |
mask = False , |
|||
frame_filters = [] |
|||
) |
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_pong_frame | ( | body, | |
mask = False , |
|||
frame_filters = [] |
|||
) |
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.create_text_frame | ( | message, | |
opcode = common.OPCODE_TEXT , |
|||
fin = 1 , |
|||
mask = False , |
|||
frame_filters = [] |
|||
) |
Creates a simple text frame with no extension, reserved bit.
def webkitpy.thirdparty.mod_pywebsocket._stream_hybi.parse_frame | ( | receive_bytes, | |
logger = None , |
|||
ws_version = common.VERSION_HYBI_LATEST , |
|||
unmask_receive = True |
|||
) |
Parses a frame. Returns a tuple containing each header field and payload. Args: receive_bytes: a function that reads frame data from a stream or something similar. The function takes length of the bytes to be read. The function must raise ConnectionTerminatedException if there is not enough data to be read. logger: a logging object. ws_version: the version of WebSocket protocol. unmask_receive: unmask received frames. When received unmasked frame, raises InvalidFrameException. Raises: ConnectionTerminatedException: when receive_bytes raises it. InvalidFrameException: when the frame contains invalid data.