in reply to Re: perldoc recv, Net::Time and HP-UX
in thread perldoc recv, Net::Time and HP-UX
So it returns the address for udp, but not for tcp.recvfrom() operates in the same manner as recv() except that it is abl +e to return the address of the socket from which the message was sent +. For connected datagram sockets, recvfrom() simply returns the same + address as getpeername() (see getpeername(2)). For stream sockets, +recvfrom() retrieves data in the same manner as recv(), but does not +return the socket address of the sender.
Anyfish, I see someone already reported on libnet that the recv line should be changed to check for 'defined', about 8 months ago, and it hasn't been changed yet.. (OTOH the explanation why possibly wasn't very clear) So I'll probably write to him and ask. (Seeing as there was a new libnet recently, just not fixing that bug..)
After looking at various docs I'm now all confused as to whats incorrect. perldoc recv says:
What does it mean with "SOCKET's protocol"? I assumed that meant tcp or udp etc. In which case different behavior on hp and on linux is a bug. If it just means 'supported at all', then it's just a misleading doc.. Further, the recv/recvfrom manpage on Linux says they all return the length of the data received, bah, I'm confused ,)Returns the address of the sender if SOCKET's protocol supports this; +returns an empty string otherwise.
C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: perldoc recv, Net::Time and HP-UX
by KPeter0314 (Deacon) on Jun 20, 2003 at 15:23 UTC |