Embedded TCP/IP stack
4.7.0
|
fnet_return_t fnet_socket_shutdown | ( | fnet_socket_t | s, |
fnet_sd_flags_t | how | ||
) |
Terminates the connection in one or both directions.
s | Descriptor, identifying a socket. |
how | Flag that describes what types of operation will no longer be allowed, it's defined by the fnet_sd_flags_t. |
This function is used on all types of sockets to disable reception, transmission, or both.
If the how
parameter is SD_READ, subsequent calls to the fnet_socket_recv() function on the socket will be unallowed. If the how
parameter is SD_WRITE, subsequent calls to the fnet_socket_send() function are unallowed. Setting the how
to the SD_BOTH disables both sends and receives as described above.
The fnet_socket_shutdown() function does not close the socket. Any resources attached to the socket will not be freed until the fnet_socket_close() is invoked.