Net::Async::WebSocket::Protocol - send and receive WebSocket frames
Net::Async::WebSocket::Protocol
This subclass of IO::Async::Stream implements an established WebSocket connection, that has already completed its setup handshaking and is ready to pass frames.
Objects of this type would not normally be constructed directly. For WebSocket clients, see Net::Async::WebSocket::Client, which is a subclass of this. For WebSocket servers, see Net::Async::WebSocket::Server, which constructs objects in this class when it accepts a new connection and passes it to its event handler.
The following named parameters may be passed to new or configure:
new
configure
A CODE reference for when a frame is received
$on_frame->( $self, $frame )
The following methods documented with a trailing call to ->get return Future instances.
->get
$self->send_frame( @args )->get
Sends a frame to the peer containing containing the given string. The arguments are passed to Protocol::WebSocket::Frame's new method.
Paul Evans <leonerd@leonerd.org.uk>
To install Net::Async::WebSocket, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::WebSocket
CPAN shell
perl -MCPAN -e shell install Net::Async::WebSocket
For more information on module installation, please visit the detailed CPAN module installation guide.