Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mention that write methods are non-blocking
  • Loading branch information
kraih committed Oct 14, 2011
1 parent d9c57d7 commit e3a452e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,6 +1,6 @@
This file documents the revision history for Perl extension Mojolicious.

2.0 2011-10-13 00:00:00
2.0 2011-10-14 00:00:00
- Code name "Leaf Fluttering In Wind", this is a major release.
- Increased Perl version requirement to 5.10.1.
- Renamed Mojo::IOLoop::EventEmitter to Mojo::EventEmitter.
Expand Down
17 changes: 9 additions & 8 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -947,8 +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 via WebSocket, only works if there is currently a WebSocket
connection in progress.
Send a message non-blocking via WebSocket, only works if a WebSocket
connection has been established.
Note that this method is EXPERIMENTAL and might change without warning!
=head2 C<session>
Expand Down Expand Up @@ -1040,8 +1040,9 @@ Generate a portable L<Mojo::URL> object with base for a route, path or URL.
$c->write(sub {...});
$c->write('Hello!', sub {...});
Write dynamic content chunk wise, 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, the optional drain callback will be
invoked once all data has been written to the kernel send buffer or
equivalent.
# Keep connection alive (with Content-Length header)
$c->res->headers->content_length(6);
Expand Down Expand Up @@ -1072,10 +1073,10 @@ timeout, which usually defaults to C<15> seconds.
$c->write_chunk(sub {...});
$c->write_chunk('Hello!', sub {...});
Write dynamic content chunk wise with the C<chunked> C<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,
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.
$c->write_chunk('He', sub {
my $c = shift;
Expand Down

0 comments on commit e3a452e

Please sign in to comment.