Chapter Contents |
Previous |
Next |
send |
Portability: | UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
PORTABILITY | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <sys/types.h> #include <sys/socket.h> int send(int s, const void *buf, int len, int flags);
DESCRIPTION |
send
transmits a message to socket descriptor
s
. The socket must be connected or associated
with a foreign peer via the
connect
function.
buf
points
to the buffer that contains the message.
len
is the number of bytes to be sent.
flags
consists of the following:
MSG_OOB
MSG_DONTROUTE
RETURN VALUE |
If
send
succeeds, it returns the number of characters sent. If there is
an error, it returns a
-1
.
PORTABILITY |
send
is portable to other environments, including most UNIX systems,
that implement BSD sockets.
RELATED FUNCTIONS |
recv
,
recvfrom
,
recvmsg
,
sendmsg
,
sendto
,
write
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.