… | |
… | |
422 | Use the C<< ->starttls >> method if you need to start TLS negotiation later. |
422 | Use 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 | |
426 | Use the given C<AnyEvent::TLS> object to create the new TLS connection |
426 | Use 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 |
428 | missing, then AnyEvent::Handle will use C<AnyEvent::Handle::TLS_CTX>. |
428 | parameter is missing (or C<undef>), then AnyEvent::Handle will use |
|
|
429 | C<AnyEvent::Handle::TLS_CTX>. |
429 | |
430 | |
430 | Instead of an object, you can also specify a hash reference with C<< key |
431 | Instead 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 |
432 | new TLS context object. |
433 | new 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}; |