Skip to content

Commit

Permalink
synopsis rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
mindc committed May 13, 2016
1 parent be15138 commit f62d04f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ C<Plack::App::Net::Async::WebSocket> - serve WebSocket clients using C<IO::Async
use Plack::App::Net::Async::WebSocket;

my $app = Plack::App::Net::Async::WebSocket->new(
on_client => sub {
my ( $client ) = @_;
$client->sent_frame( 'Hello' );
on_handshake => sub {
my ( $websocket ) = @_;
$websocket->sent_frame( 'Hello' );
},
on_frame => sub {
my ( $client, $frame ) = @_;
$client->send_frame( $frame ); # echo
my ( $websocket, $frame ) = @_;
$websocket->send_frame( $frame ); # echo
},
on_closed => sub {
my ( $client ) = @_;
my ( $websocket ) = @_;
}
);

Expand Down

0 comments on commit f62d04f

Please sign in to comment.