Problems? Is your data what you think it is? | |
PerlMonks |
Re^3: IO Socket - Detect inbound IPby BrowserUk (Patriarch) |
on Jan 25, 2011 at 21:19 UTC ( [id://884225]=note: print w/replies, xml ) | Need Help?? |
The 'address' return by accept is actually a packed sockaddr_in struct. It can be unpacked using the functions sockaddr_in() and then the inet_ntoa() functions as shown in perlipc server example (which is linked from the perlfunc description of accept):
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|