Net-Async-WebSocket-0.08

NAME

DESCRIPTION

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.

PARAMETERS

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 )

METHODS

$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.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>

Module Install Instructions

To install Net::Async::WebSocket::Protocol, simply copy and paste either of the commands in to your terminal