int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
If the socket protocol supports broadcast and the specified address
is a broadcast address for the socket protocol,
The to argument
specifies the address of the target. The len argument
specifies the length of the message. If the message is too long
to pass through the underlying protocol,
Successful completion of
If space is not available at
the sending socket to hold the message to be transmitted and the
socket file descriptor does not have O_NONBLOCK set,
flags may be used to influence the behavior of the function invocation beyond the options specified for the associated socket. That is, the semantics of this function are determined by the socket options and the flags parameter. The latter is constructed by or-ing any of the following values:
Specifies that the data should not be subject to routing.
Send out-of-band data (stream-style socket such as SOCK_STREAM only).
Specifies a socket descriptor.
Points to a buffer containing the data to be transmitted.
Specifies the number of bytes to be sent.
Lets the sender control the way data is sent.
Specifies the destination address.
Specifies the destination address size.
The specified address is not available from the local machine.
s is an invalid descriptor.
Connection was aborted due to timeout or other failure.
Connection was forcibly reset by the peer.
A destination address is required.
msg points to an unreadable location.
The remote host cannot be reached from this host at this time.
An unknown flag was specified, or MSG_OOB was specified for a socket with SO_OOBINLINE enabled.
A signal interrupted the call.
The network subsystem has failed.
No buffer space is available.
The socket is not connected. (connection oriented sockets only.)
s is not a socket descriptor.
Message size is too big to be sent atomically.
MSG_OOB was specified, but the socket is not stream style such as type SOCK_STREAM, out-of-band data is not supported in the communication domain associated with this socket, or the socket is unidirectional and supports only receive operations.
The socket has been shutdown; it is not possible to
sendto()on a socket after shutdown()has been invoked with how set to SD_SEND or SD_BOTH.
Connection has been dropped, because of a network failure or because the system on the other end went down without notice.
s is nonblocking and
UNIX 98, with exceptions.
The NuTCRACKER Platform supports all the address families that WinSock 2.0 supports.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
bind(), connect(), getsockopt(), recv(), recvfrom(), recvmsg(), select(), send(), sendmsg(), setsockopt(), shutdown(), socket()
PTC MKS Toolkit 10.3 Documentation Build 39.