… | … | ||
---|---|---|---|
20 | 20 | ||
21 | my $hdl; $hdl = | 21 | my $hdl; $hdl = |
22 | AnyEvent::Handle->new ( | 22 | AnyEvent::Handle->new ( |
23 | connect => ['www.google.com', 80], | 23 | connect => ['www.google.com', 80], |
24 | on_error => sub { | 24 | on_error => sub { |
25 | warn "socket error: $!"; | 25 | warn "handle error: $_[2]"; |
26 | $cv->broadcast; | 26 | $cv->broadcast; |
27 | }, | 27 | }, |
28 | on_eof => sub { | 28 | on_eof => sub { |
29 | my ($hdl) = @_; | 29 | my ($hdl) = @_; |
30 | 30 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |