--- AnyEvent/lib/AnyEvent/Handle.pm 2008/08/21 18:45:16 1.82 +++ AnyEvent/lib/AnyEvent/Handle.pm 2008/08/21 19:53:19 1.85 @@ -51,6 +51,9 @@ filehandles. For utility functions for doing non-blocking connects and accepts on sockets see L. +The L tutorial contains some well-documented +AnyEvent::Handle examples. + In the following, when the documentation refers to of "bytes" then this means characters. As sysread and syswrite are used for all I/O, their treatment of characters applies to this module as well. @@ -72,8 +75,9 @@ The filehandle this L object will operate on. -NOTE: The filehandle will be set to non-blocking (using -AnyEvent::Util::fh_nonblocking). +NOTE: The filehandle will be set to non-blocking mode (using +C) by the constructor and needs to stay in +that mode. =item on_eof => $cb->($handle) @@ -225,22 +229,23 @@ =item tls => "accept" | "connect" | Net::SSLeay::SSL object -When this parameter is given, it enables TLS (SSL) mode, that means it -will start making tls handshake and will transparently encrypt/decrypt +When this parameter is given, it enables TLS (SSL) mode, that means +AnyEvent will start a TLS handshake and will transparently encrypt/decrypt data. TLS mode requires Net::SSLeay to be installed (it will be loaded automatically when you try to create a TLS handle). -For the TLS server side, use C, and for the TLS client side of a -connection, use C mode. +Unlike TCP, TLS has a server and client side: for the TLS server side, use +C, and for the TLS client side of a connection, use C +mode. You can also provide your own TLS connection object, but you have to make sure that you call either C or C on it before you pass it to AnyEvent::Handle. -See the C method if you need to start TLS negotiation later. +See the C method for when need to start TLS negotiation later. =item tls_ctx => $ssl_ctx