ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Handle.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.203 by root, Sat Oct 16 03:22:10 2010 UTC vs.
Revision 1.207 by root, Mon Nov 15 22:29:36 2010 UTC

159 159
160Some errors are fatal (which is indicated by C<$fatal> being true). On 160Some errors are fatal (which is indicated by C<$fatal> being true). On
161fatal errors the handle object will be destroyed (by a call to C<< -> 161fatal errors the handle object will be destroyed (by a call to C<< ->
162destroy >>) after invoking the error callback (which means you are free to 162destroy >>) after invoking the error callback (which means you are free to
163examine the handle object). Examples of fatal errors are an EOF condition 163examine the handle object). Examples of fatal errors are an EOF condition
164with active (but unsatisifable) read watchers (C<EPIPE>) or I/O errors. In 164with active (but unsatisfiable) read watchers (C<EPIPE>) or I/O errors. In
165cases where the other side can close the connection at will, it is 165cases where the other side can close the connection at will, it is
166often easiest to not report C<EPIPE> errors in this callback. 166often easiest to not report C<EPIPE> errors in this callback.
167 167
168AnyEvent::Handle tries to find an appropriate error code for you to check 168AnyEvent::Handle tries to find an appropriate error code for you to check
169against, but in some cases (TLS errors), this does not work well. It is 169against, but in some cases (TLS errors), this does not work well. It is
422Use the C<< ->starttls >> method if you need to start TLS negotiation later. 422Use the C<< ->starttls >> method if you need to start TLS negotiation later.
423 423
424=item tls_ctx => $anyevent_tls 424=item tls_ctx => $anyevent_tls
425 425
426Use the given C<AnyEvent::TLS> object to create the new TLS connection 426Use the given C<AnyEvent::TLS> object to create the new TLS connection
427(unless a connection object was specified directly). If this parameter is 427(unless a connection object was specified directly). If this
428missing, then AnyEvent::Handle will use C<AnyEvent::Handle::TLS_CTX>. 428parameter is missing (or C<undef>), then AnyEvent::Handle will use
429C<AnyEvent::Handle::TLS_CTX>.
429 430
430Instead of an object, you can also specify a hash reference with C<< key 431Instead of an object, you can also specify a hash reference with C<< key
431=> value >> pairs. Those will be passed to L<AnyEvent::TLS> to create a 432=> value >> pairs. Those will be passed to L<AnyEvent::TLS> to create a
432new TLS context object. 433new TLS context object.
433 434
501 AnyEvent::Socket::tcp_connect ( 502 AnyEvent::Socket::tcp_connect (
502 $self->{connect}[0], 503 $self->{connect}[0],
503 $self->{connect}[1], 504 $self->{connect}[1],
504 sub { 505 sub {
505 my ($fh, $host, $port, $retry) = @_; 506 my ($fh, $host, $port, $retry) = @_;
507
508 delete $self->{_connect}; # no longer needed
506 509
507 if ($fh) { 510 if ($fh) {
508 $self->{fh} = $fh; 511 $self->{fh} = $fh;
509 512
510 delete $self->{_skip_drain_rbuf}; 513 delete $self->{_skip_drain_rbuf};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines