%SS_SEND
Send bytes to a connected peer or established peer address
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
status = %SS_SEND(socket, buf, bytes_sent)
Return value
status
Returns SS_SUCCESS (0) or one of the errors in Error codes returned by %SS_SEND 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)
Discussion
%SS_SEND writes outgoing data to a connected stream socket or to a datagram socket with an established peer address. (To send data from a datagram socket without an established peer address, use %SS_SENDTO.)
Successful completion of %SS_SEND does not indicate successful delivery of data. |
- On a connected stream socket, %SS_SEND may output fewer bytes than requested. This is not considered an error condition, but means that you may need to call %SS_SEND in a loop until all the bytes are sent. We recommend you use %SS_SENDBUF instead, as it performs the loop for you until all requested bytes have been sent.
- On a datagram socket with an established peer address, if the quantity of data exceeds the maximum IP packet size of the underlying subnets, no data is transmitted and %SS_SEND returns the error SS_EMSGSIZE.
If no buffer space is available within the transport system to hold the data to be transmitted, %SS_SEND blocks.
Error codes returned by %SS_SEND
See the Socket Errors table for additional information about these errors.
SS_EACCES
SS_EBADF
SS_ECONNABORTED
SS_ECONNRESET
SS_EDESTADDRREQ
SS_EINTR
SS_EMSGSIZE
SS_ENETDOWN
SS_ENETRESET
SS_ENOBUFS
SS_ENOTCONN
SS_ENOTSOCK
SS_EUNKNOWN
SS_NOTINITIALISED