Net::WebSocket::Frame::text
my $frm = Net::WebSocket::Frame::text->new( #This flag defaults to on fin => 1, #Optional, can be either empty (default) or four random bytes mask => q<>, payload_sr => \$payload_text, ); $frm->get_type(); #"text" $frm->is_control_frame(); #0 my $mask = $frm->get_mask_bytes(); my $payload = $frm->get_payload(); my $serialized = $frm->to_bytes(); $frm->set_fin(); #turns on
To install Net::WebSocket, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::WebSocket
CPAN shell
perl -MCPAN -e shell install Net::WebSocket
For more information on module installation, please visit the detailed CPAN module installation guide.