tfSslUserSendFlush
Table of Contents >> SSL Programmer's Reference
#include <trsocket.h> |
int tfSslUserSendFlush | (int socketDescriptor); |
Function Description
SSL will queue user data if the send path is not triggered up when TM_TCP_SSL_SEND_MIN_SIZE is greater than zero. There is a configurable send size threshold in order to trigger sending. See macro TM_TCP_SSL_SEND_MIN_SIZE for details. If user wants to manually flush the SSL send buffer, user may call this function, all data if any will be sent out right away. (Instead of making this function call, user may set NODELAY option to send the data right away too.) If macro TM_TCP_SSL_SEND_MIN_SIZE. is set to be zero, user does not need to call this function at all.
Parameters
- socketDescriptor
- Socket descriptor
Returns
- Non-negative
- The number of data bytes flushed by this call.
- TM_SOCKET_ERROR
- No data was flushed. See below.
Note: | TM_SOCKET_ERROR means that this socket call has failed and the errorCode has been set on the socket itself.
To retrieve the socket error the user must call tfGetSocketError(socketDescriptor). |
Possible socket errors
- TM_EBADF
- No data was flushed. The socket descriptor was invalid.
- TM_EPROTONOSUPPORT
- No data was flushed. The socket descriptor was not a TCP socket.
- TM_EINVAL
- No data was flushed. The TCP connection is not established.