tfRegisterSocketCBParam
Table of Contents >> SSL Programmer's Reference
| #include <trsocket.h> |
| int tfRegisterSocketCBParam | ( |
| int socketDescriptor, | |
| ttUserSocketCBParamFuncPtr socketCBParamFuncPtr, | |
| void * socketUserPtr, | |
| int eventFlags | |
| ); |
Function Description
This function is similar to tfRegisterSocketCB(), and like tfRegisterSocketCB(), it is used to register a function call upon completion of one of more socket events. It also allows the user to specify a user parameter that will be passed as a parameter to the ttUserSocketCBParamFunc call back function.
The action(s) to be taken by the user in the user-supplied ttUserSocketCBParamFunc call back function upon receiving any one of the socket events are described here.
Returns
- TM_ENOERROR
- Success
- TM_SOCKET_ERROR
- Failure
| 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
- socketDescriptor is not a valid descriptor.
- TM_EINVAL
- socketCBFuncPtr is NULL and eventFlags is non-zero.