Function DescriptionThis function is used to register a user function on a particular TCP streaming socket that will be called once for every valid incoming packet that is destined for that socket. Specify a NULL value for socketCBPacketFuncPtr to remove a function pointer that was installed previously.
By default, this feature is disabled to reduce code size. To use this function, uncomment the following macro definition in your <trsystem.h>.
- The socket descriptor to register the call back for.
- A pointer to the user-defined ttUserSocketCBPacketFunc function to be called for each packet received by the socket. Specify a NULL value to remove your callback function.
- Currently unused. Specify 0.
|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
- socketDescriptor is not a valid descriptor.