HP Rp3440-4 - 9000 - 0 MB RAM Programmer's Manual page 97

Bsd sockets interface programmer’s guide
Hide thumbs Also See for Rp3440-4 - 9000 - 0 MB RAM:
Table of Contents

Advertisement

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:
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
System call:
count = recvfrom(s,buf,len,flags,from,fromlen) int
s;
char *buf;
int len, flags;
struct sockaddr *from
int *fromlen;
Parameter
Contents
s
socket
descriptor of
local socket
buf
pointer to data
buffer
len
maximum
number of
bytes that
should be
received
Chapter 4
Using Internet Datagram Sockets
Sending and Receiving Messages
INPUT Value
socket descriptor of
socket receiving
message
pointer to buffer
that is to receive
data
size of data buffer
OUTPUT
Value
unchanged
pointer to
received data
unchanged
97

Advertisement

Table of Contents
loading

Table of Contents