Function SocketSendTo() Professional
Sends data to a specific destination.
SocketSendTo( <nSocket> , ;
<cBuffer> , ;
[<nLength>], ;
[<nFlag>] , ;
[<aToAddr>], ;
[@<nError>] ) --> nBytesWritten
Constant | Description |
---|---|
MSG_NORMAL *) | Sends regular data |
MSG_DONTROUTE | Specifies that the data should not be subject to routing. |
MSG_OOB | Sends out-of-band data (SOCK_STREAM only) |
|
The function returns the number of bytes written to socket.
This function is typically used to send datagrams on unconnected sockets to a recipient. However, the function can be called on any datagram socket, be it connected or unconnected. If the socket is unbound, unique values are assigned to the local association by the operating system, and the socket is then marked as bound. Note that the successful completion of a SocketSendTo() does not indicate that the data was successfully delivered.
To send to a broadcast address, an application must have called SocketSetOption() with SO_BROADCAST enabled. Otherwise, SocketSendTo() will fail on broadcast messages.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.