%SS_SENDTO
Send bytes through a datagram socket (IPv4)
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
status = %SS_SENDTO(socket, buf, bytes_sent, in_port, in_addr)
Return value
status
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_SENDTO below. (n)
Arguments
socket
A descriptor of an open socket created by %SS_SOCKET. (i4)
buf
Buffer containing the data to be sent. (a)
bytes_sent
Returned with the number of bytes sent from buf. (i4)
in_port
Specifies the internet port of the target socket. (i4)
in_addr
Specifies the IPv4 address of the target socket. (i4)
Discussion
%SS_SENDTO writes outgoing data through a datagram socket to a specified peer address (in_port and in_addr) where there has not been a previous call to %SS_CONNECT. (%SS_CONNECT establishes a permanent peer address.)
Successful completion of %SS_SENDTO does not indicate successful delivery of data. |
If the packet data exceeds the maximum IP packet size of the underlying subnets, no data is transmitted and the error SS_EMSGSIZE is returned.
If no buffer space is available within the transport system to hold the data to be transmitted, %SS_SENDTO blocks.
If you call %SS_SENDTO on a stream socket, it functions identically to %SS_SEND.
Error codes returned by %SS_SENDTO
See the Socket Errors table for additional information about these errors.
SS_EACCES
SS_EADDRNOTAVAIL
SS_EBADF
SS_ECONNABORTED
SS_ECONNRESET
SS_EDESTADDRREQ
SS_EFAULT
SS_EINTR
SS_EISCONN
SS_EMSGSIZE
SS_ENETDOWN
SS_ENETRESET
SS_ENETUNREACH
SS_ENOBUFS
SS_ENOTCONN
SS_ENOTSOCK
SS_EUNKNOWN
SS_NOTINITIALISED