++ed by:

1 PAUSE user
1 non-PAUSE user.

Paul Evans


Net::Async::WebSocket::Protocol - send and receive WebSocket frames


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:

on_frame => CODE

A CODE reference for when a frame is received

 $on_frame->( $self, $frame )


$self->send_frame( @args )

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>