Ok, that was easier then I had expected. The undocumented methode $sock->peerhost() will return the "human readable" ip-address of the current datagram.
Thanks, Bo Deviloper <[EMAIL PROTECTED]> hat am 22. September 2008 um 10:16 geschrieben: > Hi there, > > I got a question regarding IO::Socket. I am using IO::Socket to receive UPD > datagrams from a number of hosts. It works fine, but I can´t figure out how > to tell which host (and from which port) the datagram was send. I don´t want > to change the packet data. Here is a code snipplet of what I am trying to do. > > use IO::Socket::INET; > my $sock = IO::Socket::INET->new( LocalPort =>$receive_port, Proto => 'udp'); > > while ($sock->recv($packet,1548)) { > #...do something... > } > >