1NETWRITE(3)                     Common      Library     Functions
2NETWRITE(3)
3
4
5
6[1mNAME[0m
7       netwrite ‐ send a message on a socket
8
9[1mSYNOPSIS[0m
10       [1m#include "net.h"[0m
11
12       [1mint     netwrite     (int     [4m[22ms[24m[1m,     char
13*[4m[22mbuf[24m[1m, int [4m[22mnbytes[24m[1m);[0m
14
15       [1mssize_t   netwrite_timeout  (int  [4m[22ms[24m[1m, void
16*[4m[22mbuf[24m[1m,     size_t     [4m[22mnbytes[24m[1m,      int
17[4m[22mtime‐[0m
18       [4mout[24m[1m);[0m
19
20[1mDESCRIPTION[0m
21       [1mnetwrite [22msends a message on a socket.
22
23[1mRETURN VALUE[0m
24       This  routine returns the number of bytes if the operation
25was  success‐
26       ful,  0  if  the  connection  was closed by the remote end
27or ‐1 if the
28       operation failed. In the latter case, [1mserrno [22mis set
29appropriately.
30
31[1mERRORS[0m
32       [1mEINTR       [22mThe function was interrupted by a  sig‐
33nal.
34
35       [1mEBADF       [4m[22ms[24m is not a valid descriptor.
36
37       [1mEAGAIN      [22mThe socket is non‐blocking and there is
38no space  available
39                   in the system buffers for the message.
40
41       [1mEFAULT      [4m[22mbuf[24m is not a valid pointer.
42
43       [1mEINVAL      [4m[22mnbytes[24m is negative or zero.
44
45       [1mENOTSOCK    [4m[22ms[24m is not a socket.
46
47       [1mSECONNDROP  [22mConnection closed by remote end.
48
49       [1mSETIMEDOUT  [22mTimed out.
50
51[1mSEE ALSO[0m
52       [1msend(2)[22m, [1mneterror(3)[0m
53
54[1mAUTHOR[0m
55       [1mLCG Grid Deployment [22mTeam
56
57
58
59LCG                         $Date:    2005/03/29    09:27:19    $
60NETWRITE(3)
61
62
63
64
65
66
Impressum