NAME

Protocol::WebSocket::Fast::FrameIterator - WebSocket frame iterator class

DESCRIPTION

The class allows developer traverse on parsed websocket frames.

You cannot instantiate an object of the class direcly, it can be accessed only via Protocol::WebSocket::Fast::Parser or Protocol::WebSocket::Fast::MessageIterator.

METHODS

next()

Returns next unvisited Protocol::WebSocket::Fast::Frame parsed from incoming buffer; otherwise (i.e. when end of buffer is reached) undef is returned.

get_messages()

Returns Protocol::WebSocket::Fast::MessageIterator, if there is any unread frames left that is enough to form a message (i.e. there is a final frame). Otherwise it returns undef.

You can only call this method when you are between two messages (after last frame parsed). Otherwise it will croak. See Protocol::WebSocket::Fast::Parser for more details.

SEE ALSO

Protocol::WebSocket::Fast

Protocol::WebSocket::Fast::Frame

Protocol::WebSocket::Fast::MessageIterator

Protocol::WebSocket::Fast::Parser

rfc6455