1NETWRITE(3)                Common Library Functions                NETWRITE(3)
2
3
4

NAME

6       netwrite - send a message on a socket
7

SYNOPSIS

9       #include "net.h"
10
11       int netwrite (int s, char *buf, int nbytes);
12
13       ssize_t  netwrite_timeout  (int  s, void *buf, size_t nbytes, int time‐
14       out);
15

DESCRIPTION

17       netwrite sends a message on a socket.
18

RETURN VALUE

20       This routine returns the number of bytes if the operation was  success‐
21       ful,  0  if  the  connection  was closed by the remote end or -1 if the
22       operation failed. In the latter case, serrno is set appropriately.
23

ERRORS

25       EINTR       The function was interrupted by a signal.
26
27       EBADF       s is not a valid descriptor.
28
29       EAGAIN      The socket is non-blocking and there is no space  available
30                   in the system buffers for the message.
31
32       EFAULT      buf is not a valid pointer.
33
34       EINVAL      nbytes is negative or zero.
35
36       ENOTSOCK    s is not a socket.
37
38       SECONNDROP  Connection closed by remote end.
39
40       SETIMEDOUT  Timed out.
41

SEE ALSO

43       send(2), neterror(3)
44

AUTHOR

46       LCG Grid Deployment Team
47
48
49
50LCG                      $Date: 2005/03/29 09:27:19 $              NETWRITE(3)
Impressum