TCP/IP Programming Manual

TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := send_nw (socket, nbuffer_ptr, nbuffer_length,
flags, tag);
INT(32) error,
socket;
STRING .EXT nbuffer_ptr;
INT(32) nbuffer_length,
flags;
INT(32) tag;
error
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 in Errors (page 171).
socket
input value; specifies the socket number for the socket, as returned by the call to socket_nw.
nbuffer_ptr
input value; points to the element nb_data[0] in the following structure:
struct send_nw_str {
int nb_sent;
char nb_data[1];
};
The TAL structure is:
struct send_nw_str (*);
begin
INT nb_sent;
STRING nb_data[0:1];
end;
This structure is used by many function calls. Copy the data returned by nbuffer_ptr before
issuing another function call that uses nbuffer_ptr. This structure is provided in the netdb.h
header file.
nbuffer_length
input value; the size of the buffer pointed to by nbuffer_ptr.
flags
input value; specifies the kind of data to be sent, or specifies a routing restriction. flags has
one of the following values:
Send this message only if the destination is located on the local network; do not send
the message through a gateway.
MSG_DONTROUTE
Send the data as out-of-band data. This corresponds to the TCP URG flag.MSG_OOB
Send normal data.0
tag
input value; the tag parameter to be used for the nowait operation initiated by send_nw. (For
more information, see Asynchrony and Nowaited Operations (page 34).)
170 Library Routines