tfUserCreateTcpSocket
Table of Contents >> Appendix D: TCP Socket Importing (Socket Migration)
| #include <trsocket.h> |
| int tfUserCreateTcpSocket | ( |
| ttUserTcpConPtr userTcpConPtr, | |
| int TM_FAR * errorCodePtr | |
| ); |
Function Description
This function implements an advanced feature for creating a socket from a complete TCP state snapshot. Refer to the main article, TCP Socket Importing, for details.
Parameters
- userTcpConPtr
- A pointer to a ttUserTcpCon structure that contains the TCP connection state information to be imported into the new socket.
- errorCodePtr
- A pointer to a variable that will receive the error information.
Returns
- >= 0
- The new socket descriptor.
- TM_SOCKET_ERROR
- Failure. Examine the variable referenced by errorCodePtr for error information.
Possible socket errors
- TM_EINVAL
- Invalid parameter.
- TM_EMFILE
- Exceeded the limit on the number of sockets.
- TM_ENOBUFS
- Not enough free memory.
- TM_EAFNOSUPPORT
- Address family not supported.
- TM_EADDRINUSE
- Local address is already in use.
- TM_EHOSTUNREACH
- No route to host.
- TM_EADDRNOTAVAIL
- Remote address is not available.
- TM_ENOENT
- No matching outbound device.
Table of Contents >> Appendix D: TCP Socket Importing (Socket Migration)