IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-43
send_nw2
flags
specifies the type of data to be sent, or specifies a routing restriction. flags has
one of the following values:
tag
is the tag parameter to be used for the nowait operation initiated by send_nw2.
Errors
If an error occurs, the external variable errno is set to one of the following values:
Usage Guidelines
•
Use send_nw2 on a socket created for nowait operations. The operation initiated
by send_nw2 must be completed with a call to the AWAITIOX or AWAITIO
procedure (although AWAITIOX is recommended).
•
To determine the number of bytes that have been transferred as a result of the
send_nw2 function, call the socket_get_len call.
•
For the send_nw2 call, complete the request with a call to AWIATIOX before
issuing another function call that uses nbuffer_ptr.
For information on error checking, see Nowait Call Errors on page 5-5.
Example
The following programming example calls the send_nw2 routine and checks for the
number of bytes sent:
#include <socket.h>
#include <netdb.h>
int s;
...
MSG_DONTROUTE Send this message only if the destination is located on the
local network; do not send the message through a
gateway.
0 Send normal data.
EMSGSIZE The message was too large to be sent atomically, as
required by the socket options.
ENOTCONN The specified socket was not connected.
ESHUTDOWN The specified socket was shut down.
ETIMEDOUT The connection timed out.
ECONNRESET The connection was reset by the remote host.
EINVAL An invalid flags value was specified.