Skip to content

Commit

Permalink
slightly more consistent examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 15, 2015
1 parent e4e8165 commit cdbaceb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -877,8 +877,9 @@ You can activate C<permessage-deflate> compression by setting the
C<Sec-WebSocket-Extensions> header, this can result in much better performance,
but also increases memory usage by up to 300KB per connection.
my $headers = {'Sec-WebSocket-Extensions' => 'permessage-deflate'};
$ua->websocket('ws://example.com/foo' => $headers => sub {...});
$ua->websocket('ws://example.com/foo' => {
'Sec-WebSocket-Extensions' => 'permessage-deflate'
} => sub {...});
=head1 DEBUGGING
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -639,8 +639,8 @@ connection.

my $proto = $c->tx->with_protocols('v2.proto', 'v1.proto');

Or negotiate a subprotocol with
L<Mojo::Transaction::WebSocket/"with_protocols">.
You can also use L<Mojo::Transaction::WebSocket/"with_protocols"> to negotiate a
subprotocol.

=head2 Testing WebSocket web services

Expand Down

0 comments on commit cdbaceb

Please sign in to comment.