autobahn.websocket.compress

Attributes

Classes

PerMessageCompress

Base class for WebSocket compression negotiated parameters.

PerMessageCompressOffer

Base class for WebSocket compression parameter client offers.

PerMessageCompressOfferAccept

Base class for WebSocket compression parameter client offer accepts by the server.

PerMessageCompressResponse

Base class for WebSocket compression parameter server responses.

PerMessageCompressResponseAccept

Base class for WebSocket compression parameter server response accepts by client.

PerMessageDeflate

permessage-deflate WebSocket extension processor.

PerMessageDeflateOffer

Set of extension parameters for permessage-deflate WebSocket extension

PerMessageDeflateOfferAccept

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

PerMessageDeflateResponse

Set of parameters for permessage-deflate responded by server.

PerMessageDeflateResponseAccept

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

Module Contents

PERMESSAGE_COMPRESSION_EXTENSION[source]
class PerMessageCompress[source]

Bases: object

Base class for WebSocket compression negotiated parameters.

class PerMessageCompressOffer[source]

Bases: object

Base class for WebSocket compression parameter client offers.

class PerMessageCompressOfferAccept[source]

Bases: object

Base class for WebSocket compression parameter client offer accepts by the server.

class PerMessageCompressResponse[source]

Bases: object

Base class for WebSocket compression parameter server responses.

class PerMessageCompressResponseAccept[source]

Bases: object

Base class for WebSocket compression parameter server response accepts by client.

class PerMessageDeflate(is_server, server_no_context_takeover, client_no_context_takeover, server_max_window_bits, client_max_window_bits, mem_level, max_message_size=None)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompress, PerMessageDeflateMixin

permessage-deflate WebSocket extension processor.

DEFAULT_MEM_LEVEL = 8
DEFAULT_WINDOW_BITS = 15
__json__()[source]
__repr__()[source]
_compressor = None
_decompressor = None
_is_server
client_max_window_bits
client_no_context_takeover
compress_message_data(data)[source]
classmethod create_from_offer_accept(is_server, accept)[source]
classmethod create_from_response_accept(is_server, accept)[source]
decompress_message_data(data)[source]
end_compress_message()[source]
end_decompress_message()[source]
max_message_size = None
mem_level
server_max_window_bits
server_no_context_takeover
start_compress_message()[source]
start_decompress_message()[source]
class PerMessageDeflateOffer(accept_no_context_takeover=True, accept_max_window_bits=True, request_no_context_takeover=False, request_max_window_bits=0)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressOffer, PerMessageDeflateMixin

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

__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

accept_max_window_bits = True
accept_no_context_takeover = True
get_extension_string()[source]

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

Returns:

PMCE configuration string.

Return type:

str

classmethod parse(params)[source]

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

Parameters:

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

Returns:

A new instance of autobahn.compress.PerMessageDeflateOffer.

Return type:

obj

request_max_window_bits = 0
request_no_context_takeover = False
class PerMessageDeflateOfferAccept(offer, request_no_context_takeover=False, request_max_window_bits=0, no_context_takeover=None, window_bits=None, mem_level=None, max_message_size=None)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressOfferAccept, PerMessageDeflateMixin

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

__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

get_extension_string()[source]

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

Returns:

PMCE configuration string.

Return type:

str

max_message_size = None
mem_level = None
no_context_takeover = None
offer
request_max_window_bits = 0
request_no_context_takeover = False
window_bits = None
class PerMessageDeflateResponse(client_max_window_bits, client_no_context_takeover, server_max_window_bits, server_no_context_takeover)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressResponse, PerMessageDeflateMixin

Set of parameters for permessage-deflate responded by server.

__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

client_max_window_bits
client_no_context_takeover
classmethod parse(params)[source]

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

Parameters:

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

Returns:

A new instance of autobahn.compress.PerMessageDeflateResponse.

Return type:

obj

server_max_window_bits
server_no_context_takeover
class PerMessageDeflateResponseAccept(response, no_context_takeover=None, window_bits=None, mem_level=None, max_message_size=None)[source]

Bases: autobahn.websocket.compress_base.PerMessageCompressResponseAccept, PerMessageDeflateMixin

Set of parameters with which to accept an permessage-deflate 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

max_message_size = None
mem_level = None
no_context_takeover = None
response
window_bits = None