Skip to content

Commit

Permalink
no need to mention the kernel send buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 14, 2011
1 parent 2633917 commit 8fd45e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
6 changes: 2 additions & 4 deletions lib/Mojo/Transaction/WebSocket.pm
Expand Up @@ -512,10 +512,8 @@ Resume transaction.
$ws->send_message([$bytes]);
$ws->send_message([$bytes], sub {...});
Send a message non-blocking via WebSocket, encoding and framing will be
handled transparently.
The optional drain callback will be invoked once all data has been written to
the kernel send buffer or equivalent.
Send a message non-blocking via WebSocket, the optional drain callback will
be invoked once all data has been written.
=head2 C<server_handshake>
Expand Down
15 changes: 5 additions & 10 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -947,10 +947,8 @@ Note that this method is EXPERIMENTAL and might change without warning!
$c = $c->send_message([$bytes]);
$c = $c->send_message([$bytes], sub {...});
Send a message non-blocking via WebSocket, encoding and framing will be
handled transparently.
The optional drain callback will be invoked once all data has been written to
the kernel send buffer or equivalent.
Send a message non-blocking via WebSocket, the optional drain callback will
be invoked once all data has been written.
Note that this method is EXPERIMENTAL and might change without warning!
=head2 C<session>
Expand Down Expand Up @@ -1043,8 +1041,7 @@ Generate a portable L<Mojo::URL> object with base for a route, path or URL.
$c->write('Hello!', sub {...});
Write dynamic content non-blocking, the optional drain callback will be
invoked once all data has been written to the kernel send buffer or
equivalent.
invoked once all data has been written.
# Keep connection alive (with Content-Length header)
$c->res->headers->content_length(6);
Expand Down Expand Up @@ -1075,10 +1072,8 @@ timeout, which usually defaults to C<15> seconds.
$c->write_chunk(sub {...});
$c->write_chunk('Hello!', sub {...});
Write dynamic content non-blocking with the C<chunked> transfer encoding,
which doesn't require a C<Content-Length> header.
The optional drain callback will be invoked once all data has been written to
the kernel send buffer or equivalent.
Write dynamic content non-blocking with the C<chunked> transfer encoding, the
optional drain callback will be invoked once all data has been written.
$c->write_chunk('He', sub {
my $c = shift;
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -339,7 +339,7 @@ Sending a streaming request is almost just as easy.
$ua->start($tx);

The drain callback passed to C<write> will be invoked whenever the entire
previous chunk has been written to the kernel send buffer.
previous chunk has actually been written.

=head2 Large file downloads

Expand Down

0 comments on commit 8fd45e5

Please sign in to comment.