view release on metacpan or search on metacpan
- AnyEvent::Strict would not properly ward against io watchers
on files when the handle passed was a file descriptor.
- document "internal" variables used by the dns en-/decoder to allow
enterprising users to extend them in a semi-official way.
7.14 Sat Jun 24 01:44:19 CEST 2017
- fix a crash bug in AnyEvent::Handle with openssl 1.1.0 (patched
by Paul Howarth and apparently tracked down by Mike McCauley).
- AnyEvent::Handle->keepalive was documented (and defined) twice
(found by Matt Merhar).
- AnyEvent::Socket::tcp_bind/tcp_server would immediately unlink a unix
listening socket unless a guard is used. Change this so that no
cleanup will be performed unless a guard is used and document this more
clearly.
- make tcp_bind/tcp_server error messages more regular.
- work around latest perl upstream breakage - this time, perl5porters were
apparently bullied by a bogus CVE (CVE-2016-1238), and since distros
stupidly apply anything that has "security fix" stamped on it, it's likely
going to be a problem in practise (and working around it is trivial on
windows and unix).
- add TCP_FASTOPEN/MSG_FASTOPEN and MSG_NOSIGNAL/MSG_MORE/MSG_DONTWAIT
to constants.
- update warnings to common::sense 3.74 standards.
7.13 Sat Sep 17 04:31:49 CEST 2016
- Only call tlsext_host_name for non-empty common names (reported
by Maxime Soulé).
- log a (single) notice message if SNI is not supported.
- upgrade to UTS-46:9.0.0 draft and switch to non-transitional
behaviour, beating thunderbird, ie, edge, chrome and safari to it :)
transitions to TLS because of a "delete $self->{rbuf}".
(reported by Gerald Galster).
- improve condvar blocking wait performance (probably only noticable
with faster backends), also make it easier for event loops that
do not support blocking waits.
- PERL_ANYEVENT_MODEL now also allows full module names, although
the usefulness of this feature is not yet clear.
- add tests for all supported event loops, conditional on PERL_ANYEVENT_LOOP_TESTS.
- add t/80_ssltext.t.
- no longer use AUTOLOAD for the initial loading (for no very good reason).
- tcp_server now tries to unlink unix domain sockets when it gets destroyed.
- do not run event loop detection multiple times when programs call their cached
copies of AnyEvent::detect.
- parse_hostport now accepts absolute paths als unix domain sockets.
- suppress the idiotic warning inside POE by patching the POE::Kernel
run flags instead of asking the user to jump through contortions.
- add Task::Weaken as dependency (as recommends only at this time).
- replace PF_UNSPEC by 0, for good old minix.
6.0 (not officially released, but was on CPAN for about 15 minutes :/)
5.34 Thu May 12 09:59:41 CEST 2011
- AE::TLS didn't support both cert_file and key at the same time,
due to some copy&paste bug (reported and analyzed by vti).
- improve AE::Handle timeout documentation slightly.
5.33 Mon Feb 7 21:51:41 CET 2011
- never appeared on CPAN, for unknown reasons.
- reduce memory usage and slightly speed up the pure perl backend
by only storing the file descriptor, not the file handle.
- add missing autocork method to AnyEvent::Handle (reported
by Adam Rosenstein).
- AnyEvent::DNS->resolve errornously documented an $rcode result
argument, but there isn't (spotted by Henrik Krohns).
- the naked truth about Tk - it's basically unmaintained.
4.32 Mon Nov 3 22:46:32 CET 2008
- fix AnyEvent::Socket::resolve_sockaddr to properly support
unix sockets again and choose a proper default for
the socket type.
- fix call to resolve_sockaddr in tcp_connect.
4.31 Thu Oct 30 04:41:48 CET 2008
- implemented AnyEvent::Handle->destroy method.
- hint about unexpected effects in TLS mode.
- speed up AnyEvent::Impl::Perl by using more arrays
instead of hashes without the slightest loss of readability :)
- work around a perl argument refcounting bug.
- with some perl patches applied, AnyEvent now seems leak-free.
- update version numbers in all modules.
4.1 Thu May 29 05:45:40 CEST 2008
- INCOMPATIBLE CHANGE: renamed xxx_ip functions to xxx_address
which mirrors their purpose better (old names still available
for a while). Also moved AnyEvent::DNS::addr to
AnyEvent::Socket::resolve_sockaddr.
- implement AnyEvent->time and AnyEvent->now.
- fix IPv6 support in pack_sockaddr.
- officially un-experimentalise all newly introduced code.
- support unix domain sockets everywhere by specifying
a host of "unix/" and the pathname as service.
- implement an activity timeout in AnyEvent::Handle.
- added a regex read type to AnyEvent::Handle.
- added a json read/write type to AnyEvent::Handle.
- always croak in on_error in AnyEvent::Handle.
- document how to subclass AnyEvent::Handle.
- implement AnyEvent::Util::fork_call.
- add support for IPv6 nameservers and nameserver statements.
- work around _yet_ _another_ windows perl bug in where empty
select masks cause errors in the pure perl backend (this
workaround cannot be implemented for the other event loops,
- added (experiemntal) support for TLS/SSL in AnyEvent::Handle.
- make condvar->end call ->send as documented.
- make condvar constructor support the documented cb => argument.
- overload condvars so you can use them instead of code references.
- support more of the POSIX forms instead of a pure dotted quad for
verbatim ip addresses.
- AnyEvent::Socket::inet_aton will use AnyEvent::DNS now and not fork anymore.
- try very hard not to freeze on broken windows perls.
- make on_eof optional in AnyEvent::Handle.
- support service names in tcp_connect and tcp_server.
- work around netbsd/openbsd bug causing unix sockets not to
become writable until empty.
- only make a dummy read for error detection when getpeername
returns ENOTCONN.
- defend AnyEvent::Util::inet_aton against Coro::LWP's brutal
override.
- new AnyEvent::Guard::cancel.
3.5 Sat May 17 23:17:14 CEST 2008
- gracefully deal with systems not defining CLOCK_MONOTONIC
(as opposed to not supporting the clock itself, which worked in 3.41).
"PERL_ANYEVENT_DEBUG_SHELL"
If this env variable is nonempty, then its contents will be
interpreted by "AnyEvent::Socket::parse_hostport" and
"AnyEvent::Debug::shell" (after replacing every occurance of $$ by
the process pid). The shell object is saved in
$AnyEvent::Debug::SHELL.
This happens when the first watcher is created.
For example, to bind a debug shell on a unix domain socket in
/tmp/debug<pid>.sock, you could use this:
PERL_ANYEVENT_DEBUG_SHELL=/tmp/debug\$\$.sock perlprog
# connect with e.g.: socat readline /tmp/debug123.sock
Or to bind to tcp port 4545 on localhost:
PERL_ANYEVENT_DEBUG_SHELL=127.0.0.1:4545 perlprog
# connect with e.g.: telnet localhost 4545
lib/AnyEvent.pm view on Meta::CPAN
goto &{ UNIVERSAL::can AnyEvent => "SUPER::$name" }
};
}
# utility function to dup a filehandle. this is used by many backends
# to support binding more than one watcher per filehandle (they usually
# allow only one watcher per fd, so we dup it to get a different one).
sub _dupfh($$;$$) {
my ($poll, $fh, $r, $w) = @_;
# cygwin requires the fh mode to be matching, unix doesn't
my ($rw, $mode) = $poll eq "r" ? ($r, "<&") : ($w, ">&");
open my $fh2, $mode, $fh
or die "AnyEvent->io: cannot dup() filehandle in mode '$poll': $!,";
# we assume CLOEXEC is already set by perl in all important cases
($fh2, $rw)
}
lib/AnyEvent.pm view on Meta::CPAN
=item C<PERL_ANYEVENT_DEBUG_SHELL>
If this env variable is nonempty, then its contents will be interpreted by
C<AnyEvent::Socket::parse_hostport> and C<AnyEvent::Debug::shell> (after
replacing every occurance of C<$$> by the process pid). The shell object
is saved in C<$AnyEvent::Debug::SHELL>.
This happens when the first watcher is created.
For example, to bind a debug shell on a unix domain socket in
F<< /tmp/debug<pid>.sock >>, you could use this:
PERL_ANYEVENT_DEBUG_SHELL=/tmp/debug\$\$.sock perlprog
# connect with e.g.: socat readline /tmp/debug123.sock
Or to bind to tcp port 4545 on localhost:
PERL_ANYEVENT_DEBUG_SHELL=127.0.0.1:4545 perlprog
# connect with e.g.: telnet localhost 4545
lib/AnyEvent/Debug.pm view on Meta::CPAN
=head1 NAME
AnyEvent::Debug - debugging utilities for AnyEvent
=head1 SYNOPSIS
use AnyEvent::Debug;
# create an interactive shell into the program
my $shell = AnyEvent::Debug::shell "unix/", "/home/schmorp/myshell";
# then on the shell: "socat readline /home/schmorp/myshell"
=head1 DESCRIPTION
This module provides functionality hopefully useful for debugging.
At the moment, "only" an interactive shell is implemented. This shell
allows you to interactively "telnet into" your program and execute Perl
code, e.g. to look at global variables.
lib/AnyEvent/Debug.pm view on Meta::CPAN
and trace messages.
As a general programming guide, consider the beneficial aspects of
using more global (C<our>) variables than local ones (C<my>) in package
scope: Earlier all my modules tended to hide internal variables inside
C<my> variables, so users couldn't accidentally access them. Having
interactive access to your programs changed that: having internal
variables still in the global scope means you can debug them easier.
As no authentication is done, in most cases it is best not to use a TCP
port, but a unix domain socket, whcih can be put wherever you can access
it, but not others:
our $SHELL = AnyEvent::Debug::shell "unix/", "/home/schmorp/shell";
Then you can use a tool to connect to the shell, such as the ever
versatile C<socat>, which in addition can give you readline support:
socat readline /home/schmorp/shell
# or:
cd /home/schmorp; socat readline unix:shell
Socat can even give you a persistent history:
socat readline,history=.anyevent-history unix:shell
Binding on C<127.0.0.1> (or C<::1>) might be a less secure but sitll not
totally insecure (on single-user machines) alternative to let you use
other tools, such as telnet:
our $SHELL = AnyEvent::Debug::shell "127.1", "1357";
And then:
telnet localhost 1357
lib/AnyEvent/Impl/FLTK.pm view on Meta::CPAN
use AnyEvent (); BEGIN { AnyEvent::common_sense }
use FLTK 0.532 ();
use Scalar::Util ();
#*AE::timer = \&EV::timer;
#*AE::signal = \&EV::signal;
#*AE::idle = \&EV::idle;
# FLTK::get_time_secs returns a glob :/
# on unix, fltk uses gettimeofday, so we are likely compatible
# on windows, fltk uses GetTickCount, to which we are unlikely to be compatible with.
#sub time { FLTK::get_time_secs }
#*now = \&time;
sub timer_interval_cb {
my $id = shift; # add_timeout kills @_, so we have to make a copy :(
$id->[0] = FLTK::add_timeout $id->[1], \&timer_interval_cb, $id;
&{ $id->[2] }
}
lib/AnyEvent/Socket.pm view on Meta::CPAN
=head1 NAME
AnyEvent::Socket - useful IPv4 and IPv6 stuff. also unix domain sockets. and stuff.
=head1 SYNOPSIS
use AnyEvent::Socket;
tcp_connect "gameserver.deliantra.net", 13327, sub {
my ($fh) = @_
or die "gameserver.deliantra.net connect failed: $!";
# enjoy your filehandle
lib/AnyEvent/Socket.pm view on Meta::CPAN
# now check all parts for validity
return undef if grep !/^[0-9a-fA-F]{1,4}$/, @h, @t;
# now pad...
push @h, 0 while @h + @t < 8;
# and done
pack "n*", map hex, @h, @t
}
=item $token = parse_unix $hostname
This function exists mainly for symmetry to the other C<parse_protocol>
functions - it takes a hostname and, if it is C<unix/>, it returns a
special address token, otherwise C<undef>.
The only use for this function is probably to detect whether a hostname
matches whatever AnyEvent uses for unix domain sockets.
=cut
sub parse_unix($) {
$_[0] eq "unix/"
? pack "S", AF_UNIX
: undef
}
=item $ipn = parse_address $ip
Combines C<parse_ipv4>, C<parse_ipv6> and C<parse_unix> in one
function. The address here refers to the host address (not socket address)
in network form (binary).
If the C<$text> is C<unix/>, then this function returns a special token
recognised by the other functions in this module to mean "UNIX domain
socket".
If the C<$text> to parse is a plain IPv4 or mapped IPv4 in IPv6 address
(:ffff::<ipv4>), then it will be treated as an IPv4 address and four
octets will be returned. If you don't want that, you have to call
C<parse_ipv4> and/or C<parse_ipv6> manually (the latter always returning a
16 octet IPv6 address for mapped IPv4 addresses).
Example:
lib/AnyEvent/Socket.pm view on Meta::CPAN
I<without> name resolution).
=cut
sub parse_address($) {
for (&parse_ipv6) {
if ($_) {
s/^\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff//;
return $_
} else {
return &parse_unix
}
}
}
*aton = \&parse_address;
=item ($name, $aliases, $proto) = getprotobyname $name
Works like the builtin function of the same name, except it tries hard to
work even on broken platforms (well, that's windows), where getprotobyname
lib/AnyEvent/Socket.pm view on Meta::CPAN
Splitting a string of the form C<hostname:port> is a common
problem. Unfortunately, just splitting on the colon makes it hard to
specify IPv6 addresses and doesn't support the less common but well
standardised C<[ip literal]> syntax.
This function tries to do this job in a better way, it supports (at
least) the following formats, where C<port> can be a numerical port
number of a service name, or a C<name=port> string, and the C< port> and
C<:port> parts are optional. Also, everywhere where an IP address is
supported a hostname or unix domain socket address is also supported (see
C<parse_unix>), and strings starting with C</> will also be interpreted as
unix domain sockets.
hostname:port e.g. "www.linux.org", "www.x.de:443", "www.x.de:https=443",
ipv4:port e.g. "198.182.196.56", "127.1:22"
ipv6 e.g. "::1", "affe::1"
[ipv4or6]:port e.g. "[::1]", "[10.0.1]:80"
[ipv4or6] port e.g. "[127.0.0.1]", "[www.x.org] 17"
ipv4or6 port e.g. "::1 443", "10.0.0.1 smtp"
unix/:path e.g. "unix/:/path/to/socket"
/path e.g. "/path/to/socket"
It also supports defaulting the service name in a simple way by using
C<$default_service> if no service was detected. If neither a service was
detected nor a default was specified, then this function returns the
empty list. The same happens when a parse error was detected, such as a
hostname with a colon in it (the function is rather forgiving, though).
Example:
print join ",", parse_hostport "localhost:443";
# => "localhost,443"
print join ",", parse_hostport "localhost", "https";
# => "localhost,https"
print join ",", parse_hostport "[::1]";
# => "," (empty list)
print join ",", parse_hostport "/tmp/debug.sock";
# => "unix/", "/tmp/debug.sock"
=cut
sub parse_hostport($;$) {
my ($host, $port);
for ("$_[0]") { # work on a copy, just in case, and also reset pos
# shortcut for /path
return ("unix/", $_)
if m%^/%;
# parse host, special cases: "ipv6" or "ipv6[#p ]port"
unless (
($host) = /^\s* ([0-9a-fA-F:]*:[0-9a-fA-F:]*:[0-9a-fA-F\.:]*)/xgc
and parse_ipv6 $host
) {
/^\s*/xgc;
if (/^ \[ ([^\[\]]+) \]/xgc) {
lib/AnyEvent/Socket.pm view on Meta::CPAN
Expects a sixteen octet string representing a binary IPv6 address and
returns its textual format. Rarely used, see C<format_address> for a
nicer interface.
=item $text = format_address $ipn
Covnvert a host address in network format (e.g. 4 octets for IPv4 or 16
octets for IPv6) and convert it into textual form.
Returns C<unix/> for UNIX domain sockets.
This function works similarly to C<inet_ntop AF_INET || AF_INET6, ...>,
except it automatically detects the address type.
Returns C<undef> if it cannot detect the type.
If the C<$ipn> is a mapped IPv4 in IPv6 address (:ffff::<ipv4>), then just
the contained IPv4 address will be returned. If you do not want that, you
have to call C<format_ipv6> manually.
lib/AnyEvent/Socket.pm view on Meta::CPAN
}
sub format_address($) {
if (4 == length $_[0]) {
return &format_ipv4;
} elsif (16 == length $_[0]) {
return $_[0] =~ /^\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff(....)$/s
? format_ipv4 $1
: &format_ipv6;
} elsif (AF_UNIX == address_family $_[0]) {
return "unix/"
} else {
return undef
}
}
*ntoa = \&format_address;
=item inet_aton $name_or_address, $cb->(@addresses)
Works similarly to its Socket counterpart, except that it uses a
lib/AnyEvent/Socket.pm view on Meta::CPAN
? \&Socket::sockaddr_family
: # for 5.6.x, we need to do something much more horrible
(Socket::pack_sockaddr_in 0x5555, "\x55\x55\x55\x55"
| eval { Socket::pack_sockaddr_un "U" }) =~ /^\x00/
? sub { unpack "xC", $_[0] }
: sub { unpack "S" , $_[0] };
}
# check for broken platforms with an extra field in sockaddr structure
# kind of a rfc vs. bsd issue, as usual (ok, normally it's a
# unix vs. bsd issue, a iso C vs. bsd issue or simply a
# correctness vs. bsd issue.)
my $pack_family = 0x55 == sockaddr_family ("\x55\x55")
? "xC" : "S";
=item $sa = AnyEvent::Socket::pack_sockaddr $service, $host
Pack the given port/host combination into a binary sockaddr
structure. Handles both IPv4 and IPv6 host addresses, as well as UNIX
domain sockets (C<$host> == C<unix/> and C<$service> == absolute
pathname).
Example:
my $bind = AnyEvent::Socket::pack_sockaddr 43, v195.234.53.120;
bind $socket, $bind
or die "bind: $!";
=cut
lib/AnyEvent/Socket.pm view on Meta::CPAN
=item ($service, $host) = AnyEvent::Socket::unpack_sockaddr $sa
Unpack the given binary sockaddr structure (as used by bind, getpeername
etc.) into a C<$service, $host> combination.
For IPv4 and IPv6, C<$service> is the port number and C<$host> the host
address in network format (binary).
For UNIX domain sockets, C<$service> is the absolute pathname and C<$host>
is a special token that is understood by the other functions in this
module (C<format_address> converts it to C<unix/>).
=cut
# perl contains a bug (imho) where it requires that the kernel always returns
# sockaddr_un structures of maximum length (which is not, AFAICS, required
# by any standard). try to 0-pad structures for the benefit of those platforms.
# unfortunately, the IO::Async author chose to break Socket again in version
# 2.011 - it now contains a bogus length check, so we disable the workaround.
my $sa_un_zero = $Socket::VERSION >= 2.011
lib/AnyEvent/Socket.pm view on Meta::CPAN
used as-is. If you know that the service name is not in your services
database, then you can specify the service in the format C<name=port>
(e.g. C<http=80>).
If a host cannot be found via DNS, then it will be looked up in
F</etc/hosts> (or the file specified via C<< $ENV{PERL_ANYEVENT_HOSTS}
>>). If they are found, the addresses there will be used. The effect is as
if entries from F</etc/hosts> would yield C<A> and C<AAAA> records for the
host name unless DNS already had records for them.
For UNIX domain sockets, C<$node> must be the string C<unix/> and
C<$service> must be the absolute pathname of the socket. In this case,
C<$proto> will be ignored.
C<$proto> must be a protocol name, currently C<tcp>, C<udp> or
C<sctp>. The default is currently C<tcp>, but in the future, this function
might try to use other protocols such as C<sctp>, depending on the socket
type and any SRV records it might find.
C<$family> must be either C<0> (meaning any protocol is OK), C<4> (use
only IPv4) or C<6> (use only IPv6). The default is influenced by
lib/AnyEvent/Socket.pm view on Meta::CPAN
(shift @HOSTS_CHECKING)->() while @HOSTS_CHECKING;
}
});
}
}
}
sub resolve_sockaddr($$$$$$) {
my ($node, $service, $proto, $family, $type, $cb) = @_;
if ($node eq "unix/") {
return $cb->() if $family || $service !~ /^\//; # no can do
return $cb->([AF_UNIX, defined $type ? $type : SOCK_STREAM, 0, Socket::pack_sockaddr_un $service]);
}
unless (AF_INET6) {
$family != 6
or return $cb->();
$family = 4;
lib/AnyEvent/Socket.pm view on Meta::CPAN
} else {
# most common case
$resolve->([$node, $port]);
}
}
=item $guard = tcp_connect $host, $service, $connect_cb[, $prepare_cb]
This is a convenience function that creates a TCP socket and makes a
100% non-blocking connect to the given C<$host> (which can be a DNS/IDN
hostname or a textual IP address, or the string C<unix/> for UNIX domain
sockets) and C<$service> (which can be a numeric port number or a service
name, or a C<servicename=portnumber> string, or the pathname to a UNIX
domain socket).
If both C<$host> and C<$port> are names, then this function will use SRV
records to locate the real target(s).
In either case, it will create a list of target hosts (e.g. for multihomed
hosts or hosts with both IPv4 and IPv6 addresses) and try to connect to
each in turn.
lib/AnyEvent/Socket.pm view on Meta::CPAN
any arguments if there are no more connections). In most cases, you can
simply ignore this argument.
$cb->($filehandle, $host, $port, $retry)
If the connect is unsuccessful, then the C<$connect_cb> will be invoked
without any arguments and C<$!> will be set appropriately (with C<ENXIO>
indicating a DNS resolution failure).
The callback will I<never> be invoked before C<tcp_connect> returns, even
if C<tcp_connect> was able to connect immediately (e.g. on unix domain
sockets).
The file handle is perfect for being plugged into L<AnyEvent::Handle>, but
can be used as a normal perl file handle as well.
Unless called in void context, C<tcp_connect> returns a guard object that
will automatically cancel the connection attempt when it gets destroyed
- in which case the callback will not be invoked. Destroying it does not
do anything to the socket after the connect was successful - you cannot
"uncall" a callback that has been invoked already.
lib/AnyEvent/Socket.pm view on Meta::CPAN
});
}, sub {
my ($fh) = @_;
# could call $fh->bind etc. here
15
};
Example: connect to a UNIX domain socket.
tcp_connect "unix/", "/tmp/.X11-unix/X0", sub {
...
}
=cut
sub tcp_connect($$$;$) {
my ($host, $port, $connect, $prepare) = @_;
# see http://cr.yp.to/docs/connect.html for some tricky aspects
# also http://advogato.org/article/672.html
lib/AnyEvent/Socket.pm view on Meta::CPAN
on whether IPv4 or IPv6 is the preferred protocol, and maybe to both in
future versions, as applicable).
To bind to the IPv4 wildcard address, use C<0>, to bind to the IPv6
wildcard address, use C<::>.
The port is specified by C<$service>, which must be either a service name
or a numeric port number (or C<0> or C<undef>, in which case an ephemeral
port will be used).
For UNIX domain sockets, C<$host> must be C<unix/> and C<$service> must be
the absolute pathname of the socket. This function will try to C<unlink>
the socket before it tries to bind to it, and will try to unlink it after
it stops using it. See SECURITY CONSIDERATIONS, below.
For each new connection that could be C<accept>ed, call the C<<
$accept_cb->($fh, $host, $port) >> with the file handle (in non-blocking
mode) as first, and the peer host and port as second and third arguments
(see C<tcp_connect> for details).
Croaks on any errors it can detect before the listen.
lib/AnyEvent/Socket.pm view on Meta::CPAN
tcp_server undef, undef, sub {
my ($fh, $host, $port) = @_;
syswrite $fh, "The internet is full, $host:$port. Go away!\015\012";
}, sub {
my ($fh, $thishost, $thisport) = @_;
AE::log info => "Bound to $thishost, port $thisport.";
};
Example: bind a server on a unix domain socket.
tcp_server "unix/", "/tmp/mydir/mysocket", sub {
my ($fh) = @_;
};
=item $guard = AnyEvent::Socket::tcp_bind $host, $service, $done_cb[, $prepare_cb]
Same as C<tcp_server>, except it doesn't call C<accept> in a loop for you
but simply passes the listen socket to the C<$done_cb>. This is useful
when you want to have a convenient set up for your listen socket, but want
to do the C<accept>'ing yourself, for example, in another process.
lib/AnyEvent/Socket.pm view on Meta::CPAN
? setsockopt $_[0], Socket::IPPROTO_TCP (), TCP_CONGESTION, "$_[1]"
: undef
}
=back
=head1 SECURITY CONSIDERATIONS
This module is quite powerful, with with power comes the ability to abuse
as well: If you accept "hostnames" and ports from untrusted sources,
then note that this can be abused to delete files (host=C<unix/>). This
is not really a problem with this module, however, as blindly accepting
any address and protocol and trying to bind a server or connect to it is
harmful in general.
=head1 AUTHOR
Marc Lehmann <schmorp@schmorp.de>
http://anyevent.schmorp.de
=cut