NAME
    AnyEvent::Handle::UDP - AnyEvent::Handle for client/server UDP sockets

VERSION
    0.03

DESCRIPTION
    I suddenly decided to leave any AnyEvent code (including
    AnyEvent::TFTPd), due to a community and development model that is
    indeed very hard to work with. If you want this module, please drop me
    mail and I'll hand over the maintenance.

    Update: AnyEvent::Handle states:

        # too many clueless people try to use udp and similar sockets
        # with AnyEvent::Handle, do them a favour.

    So instead of hacking the source of AnyEvent I'm simply abandoning this
    ship.

SYNOPSIS
      use AnyEvent::Handle::UDP;

      my $udp = AnyEvent::Handle::UDP->new(
                    listen => 'localhost:12345',
                    read_size => 512,
                    on_read => sub {
                        my $handle = shift;
                        print "packet=", $handle->rbuf, "\n";
                        $handle->{'rbuf'} = '';
                    },
                );

ATTRIBUTES
  socket
    Holds an IO::Socket::INET object, representing the connection.

  peername
    Proxy method for IO::Socket::INET::peername.

  peerhost
    Proxy method for IO::Socket::INET::peerhost.

  peerport
    Proxy method for IO::Socket::INET::peerport.

  sockname
    Proxy method for IO::Socket::INET::sockname.

  sockhost
    Proxy method for IO::Socket::INET::sockhost.

  sockport
    Proxy method for IO::Socket::INET::sockport.

METHODS
  new
    The constructor supports the same arguments as AnyEvent::Handle::new(),
    except: tls*.

    To create a listener:

     AnyEvent::Handle::UDP->new(
        listen => "$host:$port",
     );

    Not yet implemented: "connect".

    Does not make any sense for UDP: "on_prepare", "on_connect",
    "on_connect_error", "keepalive", "oobinline" and "on_eof".

  start_read
    See AnyEvent::Handle::start_read(). This method is a modified version
    which use "recv()" on the socket instead of "sysread()". The peer data
    is available inside "on_read()", but must be stored away, since it will
    be overwritten on next "recv()".

COPYRIGHT & LICENSE
    Copyright 2007 Jan Henning Thorsen, all rights reserved.

    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

AUTHOR
    Jan Henning Thorsen "jhthorsen at cpan.org"

