ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV/DNS.pm
Revision: 1.3
Committed: Fri Oct 26 18:21:32 2007 UTC (16 years, 7 months ago) by root
Branch: MAIN
CVS Tags: rel-0_02
Changes since 1.2: +0 -2 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 =head1 NAME
2
3 EV::DNS - perl interface to libevent's evdns module
4
5 =head1 SYNOPSIS
6
7 use EV::DNS;
8
9 EV::DNS::resolve_reverse +(Socket::inet_aton "129.13.162.95"), 0, sub {
10 my ($result, $type, $ttl, @ptrs) = @_;
11 warn "resolves to @ptrs";
12 };
13
14 EV::DNS::resolve_ipv4 "www.goof.com", 0, sub {
15 my ($result, $type, $ttl, @ptrs) = @_;
16 warn "resolves to " . Socket::inet_ntoa $ptrs[0]
17 if @ptrs;
18 };
19
20 =head1 DESCRIPTION
21
22 This module provides an interface to libevent's evdns module, see
23 (L<http://monkey.org/~provos/libevent/>).
24
25 =cut
26
27 package EV::DNS;
28
29 use strict;
30
31 use EV;
32
33 =head1 FUNCTIONAL INTERFACE
34
35 TODO
36
37 =over 4
38
39 =back
40
41
42 =head1 BUGS
43
44 * At least up to version 1.3e of libevent, resolve_reverse_ipv6 will
45 always crash the program with an assertion failure.
46 * use'ing this module will keep events registered so the event loop
47 will never return unless loopexit is called.
48
49 =cut
50
51 init;
52
53 1;
54
55 =head1 SEE ALSO
56
57 =head1 AUTHOR
58
59 Marc Lehmann <schmorp@schmorp.de>
60 http://home.schmorp.de/
61
62 =cut
63