Skip to content
Browse files

remove bogus poll_cb explanation from the spec and FAQ

  • Loading branch information...
1 parent a7a2342 commit b921396a73375be8bfacd2839eb8b7a951685aca @miyagawa miyagawa committed Nov 18, 2009
Showing with 1 addition and 10 deletions.
  1. +0 −2 PSGI.pod
  2. +1 −8 PSGI/FAQ.pod
View
2 PSGI.pod
@@ -469,8 +469,6 @@ methods. Again, an example illustrates this best.
my $new_event = shift;
if ($new_event) {
$writer->write($new_event->as_json . "\n");
- # Or:
- # $writer->poll_cb(sub { $_[0]->write($new_event->as_json . "\n") });
} else {
$writer->close;
}
View
9 PSGI/FAQ.pod
@@ -470,21 +470,14 @@ Flash socket or multipart XMLHTTPRequest):
wait_for_new_message(sub {
my $message = shift;
if ($message) {
- $writer->poll_cb(sub {
- $_[0]->write($message->to_json);
- });
+ $writer->write($message->to_json);
} else {
$writer->close;
}
});
};
};
-C<poll_cb> pushes the callback to the buffer to write your content
-whenever a client is ready to receive the content. You can just use
-C<write> instead of C<poll_cb> but that might cause a problem if you
-stream a massive streaming content against a slow HTTP client.
-
=head3 Which framework should I use to do streaming though?
We have servers that support non-blocking (where C<psgi.nonblocking>

0 comments on commit b921396

Please sign in to comment.
Something went wrong with that request. Please try again.