autobahn.websocket.compress_bzip2


Module Contents

Classes

PerMessageBzip2Mixin

Mixin class for this extension.

PerMessageBzip2Offer

Set of extension parameters for permessage-bzip2 WebSocket extension

PerMessageBzip2OfferAccept

Set of parameters with which to accept an permessage-bzip2 offer

PerMessageBzip2Response

Set of parameters for permessage-bzip2 responded by server.

PerMessageBzip2ResponseAccept

Set of parameters with which to accept an permessage-bzip2 response

PerMessageBzip2

permessage-bzip2 WebSocket extension processor.

class autobahn.websocket.compress_bzip2.PerMessageBzip2Mixin[source]

Bases: object

Mixin class for this extension.

EXTENSION_NAME = permessage-bzip2

Name of this WebSocket extension.

COMPRESS_LEVEL_PERMISSIBLE_VALUES = [1, 2, 3, 4, 5, 6, 7, 8, 9]

Permissible value for compression level parameter.

class autobahn.websocket.compress_bzip2.PerMessageBzip2Offer(accept_max_compress_level=True, request_max_compress_level=0)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressOffer, PerMessageBzip2Mixin

Set of extension parameters for permessage-bzip2 WebSocket extension offered by a client to a server.

classmethod parse(params)[source]

Parses a WebSocket extension offer for permessage-bzip2 provided by a client to a server.

Parameters

params (list) – Output from autobahn.websocket.WebSocketProtocol._parseExtensionsHeader().

Returns

object – A new instance of autobahn.compress.PerMessageBzip2Offer.

get_extension_string()[source]

Returns the WebSocket extension configuration string as sent to the server.

Returns

PMCE configuration string.

Return type

str

__json__()[source]

Returns a JSON serializable object representation.

Returns

JSON serializable representation.

Return type

dict

__repr__()[source]

Returns Python object representation that can be eval’ed to reconstruct the object.

Returns

Python string representation.

Return type

str

class autobahn.websocket.compress_bzip2.PerMessageBzip2OfferAccept(offer, request_max_compress_level=0, compress_level=None)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressOfferAccept, PerMessageBzip2Mixin

Set of parameters with which to accept an permessage-bzip2 offer from a client by a server.

get_extension_string()[source]

Returns the WebSocket extension configuration string as sent to the server.

Returns

PMCE configuration string.

Return type

str

__json__()[source]

Returns a JSON serializable object representation.

Returns

JSON serializable representation.

Return type

dict

__repr__()[source]

Returns Python object representation that can be eval’ed to reconstruct the object.

Returns

Python string representation.

Return type

str

class autobahn.websocket.compress_bzip2.PerMessageBzip2Response(client_max_compress_level, server_max_compress_level)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressResponse, PerMessageBzip2Mixin

Set of parameters for permessage-bzip2 responded by server.

classmethod parse(params)[source]

Parses a WebSocket extension response for permessage-bzip2 provided by a server to a client.

Parameters

params (list) – Output from autobahn.websocket.WebSocketProtocol._parseExtensionsHeader().

Returns

A new instance of autobahn.compress.PerMessageBzip2Response.

Return type

obj

__json__()[source]

Returns a JSON serializable object representation.

Returns

JSON serializable representation.

Return type

dict

__repr__()[source]

Returns Python object representation that can be eval’ed to reconstruct the object.

Returns

Python string representation.

Return type

str

class autobahn.websocket.compress_bzip2.PerMessageBzip2ResponseAccept(response, compress_level=None)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressResponseAccept, PerMessageBzip2Mixin

Set of parameters with which to accept an permessage-bzip2 response from a server by a client.

__json__()[source]

Returns a JSON serializable object representation.

Returns

JSON serializable representation.

Return type

dict

__repr__()[source]

Returns Python object representation that can be eval’ed to reconstruct the object.

Returns

Python string representation.

Return type

str

class autobahn.websocket.compress_bzip2.PerMessageBzip2(is_server, server_max_compress_level, client_max_compress_level)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompress, PerMessageBzip2Mixin

permessage-bzip2 WebSocket extension processor.

DEFAULT_COMPRESS_LEVEL = 9
classmethod create_from_response_accept(is_server, accept)[source]
classmethod create_from_offer_accept(is_server, accept)[source]
__json__()[source]
__repr__()[source]

Return repr(self).

start_compress_message()[source]
compress_message_data(data)[source]
end_compress_message()[source]
start_decompress_message()[source]
decompress_message_data(data)[source]
end_decompress_message()[source]