%SS2_SENDTO
Send bytes through a datagram socket
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
status = %SS2_SENDTO(socket, buf, bytes_sent, in_port, in_addr6)
Return value
status
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS2_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_addr6
Specifies the IP address (IPv4 or IPv6) of the target socket. ([#]byte)
Discussion
%SS2_SENDTO writes outgoing data through a datagram socket to a specified peer address (in_port and in_addr6) where there has not been a previous call to %SS2_CONNECT. (%SS2_CONNECT establishes a permanent peer address.) It supports both IPv4 and IPv6 formatted addresses.
Successful completion of %SS2_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, %SS2_SENDTO blocks.
If you call %SS2_SENDTO on a stream socket, it functions identically to %SS_SEND.
Error codes returned by %SS2_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