my $streamer = $deflate_data->create_streamer( $frame_class ); #These frames form a single compressed message in three #fragments whose content is “onetwothree”. my @frames = ( $streamer->create_chunk('one'), $streamer->create_chunk('two'), $streamer->create_final('three'), );
This class implements fragmentation for the permessage-deflate WebSocket extension. It allows you to send a single message in arbitrarily many parts. The class is not instantiated directly, but instances are returned as the result of Net::WebSocket::PMCE::deflate::Data’s
Strictly speaking, this is a base class; the
::Server subclasses implement a bit of logic specific to either endpoint type.
create_final() methods follow the same pattern as Net::WebSocket::Streamer.
Compresses OCTET_STRING. The compressor doesn’t necessarily produce output from this, however. If the compressor does produce output, then this method returns a frame object (an instance of either the streamer’s assigned frame class or Net::WebSocket::Frame::continuation); otherwise, undef is returned.
Compresses OCTET_STRING and flushes the compressor. The output matches that of
create_chunk() except that the output is always a frame object. The output of this method will complete the message.