X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUDP.pm;h=fda14c6f8680ff43e9f1b1cae09adfa641b16810;hb=56526488941b1e3a410279f3d4061649b8319444;hp=28daf805b7c4b554c947de42fac1bc9fd82cd94b;hpb=9c8f43f26a7db08c4ff6ef2213c95c9f509abe36;p=spider.git diff --git a/perl/DXUDP.pm b/perl/DXUDP.pm index 28daf805..fda14c6f 100644 --- a/perl/DXUDP.pm +++ b/perl/DXUDP.pm @@ -39,6 +39,7 @@ A simple Mojo compatible UDP thingy use Mojo::Base 'Mojo::EventEmitter'; use Mojo::IOLoop; use Scalar::Util qw(weaken); +use IO::Socket::INET6; our $VERSION = '0.04'; @@ -139,6 +140,8 @@ sub _incoming { $self->emit(read => $datagram); } +has peerhost => sub { return $_[0]->{socket}->peerhost }; +has peerport => sub { return $_[0]->{socket}->peerport }; sub DEMOLISH { my $self = shift;