in reply to How to create a socket so that it can receive the data from any peer IP and port?

Get rid of PeerPort and PeerAddr. And LocalAddr for that matter. And you have "new" there twice?!
use IO::Socket::INET; my $sock = IO::Socket::INET->new( Proto => 'UDP', LocalPort => $port, ) or die("Can't create socket: $!\n");
  • Comment on Re: How to create a socket so that it can receive the data from any peer IP and port?
  • Download Code

Replies are listed 'Best First'.
Re^2: How to create a socket so that it can receive the data from any peer IP and port?
by sanjay nayak (Sexton) on Dec 29, 2008 at 09:46 UTC

    Hi

    Thanks a lot for your reply. Now it is working fine.

    Regd's
    Sanjay