IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-42
send_nw2
send_nw2
The send_nw2 function sends data on a connected socket. Unlike the send and
send_nw calls, the send_nw2 call does not store the number of bytes sent in the data
buffer. Therefore, the send_nw2 call does not require the application to allocate
2 bytes in front of its data buffer to receive the number of bytes sent. Instead, the
application should call socket_get_len to obtain the number of bytes sent.
nsent
is the return value. If the call is successful, a zero is returned. If the call is not
successful, -1 is returned. If the call failed, the external variable errno is set as
indicated below in “Errors.”
socket
specifies the socket number for the socket, as returned by the call to socket_nw.
nbuffer_ptr
specifies the data to be sent. Call AWAITIOX to complete the send_nw2 call.
nbuffer_length
is the size of the buffer pointed to by nbuffer_ptr.
C Synopsis
#include <socket.h>
#include <netdb.h>
nsent := send_nw2 (socket, nbuffer_ptr, nbuffer_length,
flags, tag);
int nsent, socket, nbuffer_length, flags;
char *nbuffer_ptr;
long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
nsent := send_nw2 (socket, nbuffer_ptr, nbuffer_length,
flags, tag);
INT socket,
nbuffer_length,
flags;
STRING .EXT nbuffer_ptr;
INT(32) tag;