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

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.417 by root, Tue Dec 17 18:36:22 2013 UTC vs.
Revision 1.418 by root, Tue Jan 21 16:48:34 2014 UTC

1033To understand the usefulness of this function, consider a function that 1033To understand the usefulness of this function, consider a function that
1034asynchronously does something for you and returns some transaction 1034asynchronously does something for you and returns some transaction
1035object or guard to let you cancel the operation. For example, 1035object or guard to let you cancel the operation. For example,
1036C<AnyEvent::Socket::tcp_connect>: 1036C<AnyEvent::Socket::tcp_connect>:
1037 1037
1038 # start a conenction attempt unless one is active 1038 # start a connection attempt unless one is active
1039 $self->{connect_guard} ||= AnyEvent::Socket::tcp_connect "www.example.net", 80, sub { 1039 $self->{connect_guard} ||= AnyEvent::Socket::tcp_connect "www.example.net", 80, sub {
1040 delete $self->{connect_guard}; 1040 delete $self->{connect_guard};
1041 ... 1041 ...
1042 }; 1042 };
1043 1043
2210used, and preference will be given to protocols mentioned earlier in the 2210used, and preference will be given to protocols mentioned earlier in the
2211list. 2211list.
2212 2212
2213This variable can effectively be used for denial-of-service attacks 2213This variable can effectively be used for denial-of-service attacks
2214against local programs (e.g. when setuid), although the impact is likely 2214against local programs (e.g. when setuid), although the impact is likely
2215small, as the program has to handle conenction and other failures anyways. 2215small, as the program has to handle connection and other failures anyways.
2216 2216
2217Examples: C<PERL_ANYEVENT_PROTOCOLS=ipv4,ipv6> - prefer IPv4 over IPv6, 2217Examples: C<PERL_ANYEVENT_PROTOCOLS=ipv4,ipv6> - prefer IPv4 over IPv6,
2218but support both and try to use both. C<PERL_ANYEVENT_PROTOCOLS=ipv4> 2218but support both and try to use both. C<PERL_ANYEVENT_PROTOCOLS=ipv4>
2219- only support IPv4, never try to resolve or contact IPv6 2219- only support IPv4, never try to resolve or contact IPv6
2220addresses. C<PERL_ANYEVENT_PROTOCOLS=ipv6,ipv4> support either IPv4 or 2220addresses. C<PERL_ANYEVENT_PROTOCOLS=ipv6,ipv4> support either IPv4 or

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines