I write a receive sub to get remote message, how can I get the requester's address after accept a new link request from remote? The receiving thread sub as below:
my $port = shift;
my $sock = new IO::Socket::INET (LocalPort => $port,Proto => 'tcp'
+,Listen => 1,Reuse => 1,);
die "Could not create socket: $!\n" unless $sock;
$listeningCreated = 1;
my $new_sock = $sock->accept();
print "New updates from targets arrival:\n";
How can I do based on the current code? It works OK currently. But I want to do the remote address. Thanks!