in reply to Re: A Simple Socket Server Using 'inetd'
in thread A Simple Socket Server Using 'inetd'
You can, though I'm not sure if there's any quirks to it (including how it behaves when not run from inetd)
That gives you $port and $ip nicely ready to use.my $hersockaddr = getpeername(STDOUT); my ($port, $iaddr) = sockaddr_in($hersockaddr); my $ip = inet_ntoa($iaddr);
|
---|
In Section
Tutorials