HP Rp7410 BSD Sockets Interface Programmer's Guide - Page 45
Flag Options
![]() |
View all HP Rp7410 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 45 highlights
Using Internet Stream Sockets Sending and Receiving Data Parameter Description of Contents INPUT Value s buf len flags socket descriptor of local socket descriptor of socket socket receiving data pointer to data buffer pointer to buffer that is to receive data maximum number of bytes that should be received size of data buffer settings for optional flags 0, MSG_OOB or MSG_PEEK Function result: number of bytes actually received, -1 if failure occurs. Example: count = recv(s, buf, 10, 0); recv blocks until there is at least 1 byte of data to be received, unless you are using nonblocking I/O. The host does not wait for len bytes to be available; if less than len bytes are available, that number of bytes are received. No more than len bytes of data are received. If there are more than len bytes of data on the socket, the remaining bytes are received on the next recv. Flag Options The flag options are: • 0 for no options. • MSG_OOB for out of band data. • MSG_PEEK for a nondestructive read . Use the MSG_OOB option if you want to receive out of band data. Refer to the "Sending and Receiving Out of Band Data" section of chapter 3, "Advanced Topics for Stream Sockets," for more information. Chapter 2 45
![](/manual_guide/products/hewlettpackard-rp5405-bsd-sockets-interface-programmers-guide-5276e7d/45.png)