HP Rp7410 BSD Sockets Interface Programmer's Guide - Page 97
recvfrom, recvmsg, recv2
View all HP Rp7410 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 97 highlights
Using Internet Datagram Sockets Sending and Receiving Messages recv can also be used if you do not need to know what socket sent the message. However, if you want to send a response to the message, you must know where it came from. Except for the extra information returned by recvfrom and recvmsg, the three calls are identical. recv is described in the "Receiving Data" section of the "BSD Sockets: Using Internet Stream Sockets" chapter in this guide and in the recv(2) man page. recvfrom and its parameters are described in the following table. Include files: System call: #include #include #include count = recvfrom(s,buf,len,flags,from,fromlen) int s; char *buf; int len, flags; struct sockaddr *from int *fromlen; Parameter s buf len Contents INPUT Value OUTPUT Value socket descriptor of local socket pointer to data buffer maximum number of bytes that should be received socket descriptor of socket receiving message pointer to buffer that is to receive data size of data buffer unchanged pointer to received data unchanged Chapter 4 97