xtd 0.2.0
Loading...
Searching...
No Matches

◆ close()

void xtd::net::sockets::tcp_client::close ( )

Disposes this xtd::net::sockets::tcp_client instance and requests that the underlying TCP connection be closed.

Remarks
The xtd::net::sockets::tcp_client::close method marks the instance as disposed and requests that the associated xtd::net::sockets::socket close the TCP connection. Based on the xtd::net::sockets::tcp_client::linger_state property,
the TCP connection may stay open for some time after the xtd::net::sockets::tcp_client::close method is called when data remains to be sent. There is no notification provided when
the underlying connection has completed closing.
Calling this method will eventually result in the close of the associated xtd::net::sockets::socket and will also close the associated xtd::net::sockets::network_stream that is used to send and receive data if one was created.