| Summary |
#include <rtl.h>
BOOL tcp_release_socket (
U8 socket ); /* TCP socket to release. */
|
| Description | The tcp_release_socket function de-allocates the memory used by the TCP socket. The argument socket specifies the handle of the socket to be released. The tcp_release_socket function is in the RL-TCPnet library. The prototype is defined in rtl.h. note - You must call the tcp_release_socket function when you do not need the TCP socket any longer.
- After calling tcp_release_socket the socket is free to use by another process.
|
| Return Value | The tcp_release_socket function returns __TRUE if the TCP socket has been released successfully. Otherwise, the function returns __FALSE. |
| See Also | tcp_abort, tcp_close, tcp_get_socket |
| Example |
#include <rtl.h>
void disconnect_tcp (U8 tcp_soc) {
..
/* This TCP connection needs to close immediately */
tcp_abort (tcp_soc);
/* Socket will not be needed anymore */
tcp_release_socket (tcp_soc);
}
|