in reply to Re^3: IO Socket - Detect inbound IP
in thread IO Socket - Detect inbound IP
my ($new_sock, $client_addr) = $sock->accept(); my $peerhost = $sock->peeraddr(); my $addr = inet_ntoa($peerhost); print "$addr\n"; print $client_addr\n"; while(<$new_sock>) { print $_; } close($sock);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: IO Socket - Detect inbound IP
by ikegami (Patriarch) on Jan 25, 2011 at 22:17 UTC |