The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

CLASS->new( %OPTS )

%OPTS is:

deflate_max_window_bits - optional; the number of window bits to use for compressing messages. This should correspond with the local endpoint’s behavior; i.e., for a server, this should match the server_max_window_bits extension parameter in the WebSocket handshake.
inflate_max_window_bits - optional; the number of window bits to use for decompressing messages. This should correspond with the remote peer’s behavior; i.e., for a server, this should match the client_max_window_bits extension parameter in the WebSocket handshake.
deflate_no_context_takeover - corresponds to either the client_no_context_takeover or server_no_context_takeover parameter, to match the local endpoint’s role. When this flag is set, the object will do a full flush at the end of each compress() call.

$msg = OBJ->create_message( FRAME_CLASS, PAYLOAD )

Creates an unfragmented, compressed message. The message will be an instance of the class that Net::WebSocket::Message::create_from_frames() would instantiate; e.g., if FRAME_CLASS is Net::WebSocket::Frame::text, the message will be of type Net::WebSocket::Message::text.

This method cannot be called while a streamer object has yet to create its final frame.

NOTE: This function alters PAYLOAD.

$msg = OBJ->create_streamer( FRAME_CLASS )

Returns an instance of Net::WebSocket::PMCE::deflate::Data::Streamer based on this object.

$decompressed = OBJ->decompress( COMPRESSED_PAYLOAD )

Decompresses the given string and returns the result.

NOTE: This function alters COMPRESSED_PAYLOAD, such that it’s probably not useful afterward.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 25:

Non-ASCII character seen before =encoding in 'endpoint’s'. Assuming UTF-8