Ssend
Previous Topic  Next Topic 

Synopsis:

     Ssend (socket, data, no_bytes, [, data1[,data2...]])   

Arguments:

       socket - The socket handle

       data - The data string to send

       no_bytes - The number of bytes to send

       [data1[,data2..]] - Optional additional data to send if data to send exceeds maximum Telecom Engine string length


Description:    This function allows the specified number of bytes (no_bytes) of data to be sent over the specified socket handle.        The data to send is passed in the data variable.      However if more data needs to be sent than can be fit into a single Telecom Engine string variable then addtional data can be sent by specifying the optional [data1[,data2...] arguments.      These additional data arguments will be simple appended to the first data argument and sent out in a single send command.      Note however that the same effect can be achieved by issuing multiple Ssend() commands.


If the socket is not currently ready to send data (for example if the send buffer is full) then the function will return -3 (EWOULDBLOCK).     A call to Scheck() can be made prior to the Ssend() call to check whether the socket is ready for writing.


Returns:   Returns 0 upon success or a negative error code.