NAME
Protocol::WebSocket::Fast::FrameSender - low-level frame generator helper
DESCRIPTION
The class helps in creation of low-level frames of a single message. It might be useful if message data is partly available and should be serialized and delivered to peer ASAP as a frame.
You cannot instantiate an object of the class direcly, it can be accessed only via Protocol::WebSocket::Fast::Parser.
METHODS
send($string|\@strings, [$final = 0])
Returns serialized frame with the supplied payload (in form of string or array of strings).
Set $final
to a true value for the last frame to finalize the message. In this case no further send()
calls are allowed.
If deflate
is enabled then send()
may generate an empty frames (except for the last frame) due to output latency. final
frame flushes all accumulated compressed payload.
SEE ALSO
Protocol::WebSocket::Fast::FrameIterator
Protocol::WebSocket::Fast::Message