PocketIO::Socket - Socket class
Instance of PocketIO::Socket is actually the object that you get in a handler.
builder { mount '/socket.io' => PocketIO->new( handler => sub { my $socket = shift; # $socket is PocketIO::Socket instance } ); ... };
new
Create new instance.
close
Close connection.
emit
Emit event.
get
Get attribute.
set
Set atribute.
id
Get session id.
session_id
Same as id.
on
Register event.
send
Send message.
sockets
Get sockets object.
broadcast
Get broadcasting object.
To install PocketIO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PocketIO
CPAN shell
perl -MCPAN -e shell install PocketIO
For more information on module installation, please visit the detailed CPAN module installation guide.