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 06e96be commit be15138
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Plack/App/Net/Async/WebSocket.pm
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,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 be15138

Please sign in to comment.