TCP/IP Programming Manual
flags
input value; specifies how the incoming message must be read, and takes one of the following
values:
Read the incoming message without removing the message from the queue.MSG_PEEK
No flag; read data normally.0
tag
is the tag parameter to be used for the nowait operation initiated by t_recvfrom_nw64_.
Errors
If an error occurs, the return value is set to -1 and the external variable errno is set to one of the
following values:
The specified socket was connected.EISCONN
The specified socket was shut down.ESHUTDOWN
An invalid argument was specified.EINVAL
Usage Guidelines
• This is a nowait call; it must be completed with a call to the FILE_AWAITIO64_ procedure.
For a waited call, use recvfrom64_.
• The parameters of the t_recvfrom_nw64_ function are not compatible with those of the
recvfrom64_ function in the 4.3 BSD UNIX operating system.
• The length of the received data is specified in the third parameter (count transferred) returned
from the FILE_AWAITIO64_ procedure. This length includes the address information given
by sizeof(sockaddr_in) at the beginning of the buffer.
• Note that the MSG_OOB option is not available. This is a constraint imposed by UDP. UDP
does not support out-of-band data.
For information on checking errors, see Nowait Call Errors (page 86).
t_sendto_nw
The t_sendto_nw function sends data on an unconnected UDP socket or raw socket created for
nowait operations. This routine is replaced by the sendto_nw routine.
C Synopsis
#include <socket.h>
#include <in.h>
#include <netdb.h>
error = t_sendto_nw (socket, r_buffer_ptr, length, flags, tag);
int error, socket, length, flags;
struct sendto_recvfrom_buf *r_buffer_ptr;
long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := t_sendto_nw (socket, r_buffer_ptr, length, flags, tag);
INT socket,
length;
204 Library Routines