Let's say we have a basic TCP server with a .NET TcpListener
, with a basic TCP client using a .NET TcpClient
.
What types of connection terminations are there, and how are they supposed to be checked for and handled?
Client
A. Client gracefully terminates the connection. The server is notified.
B. Client physically disconnects from the network. How does the server know?
C. Client program shuts down without a graceful disconnect. How does the server know?
Server
A. Server gracefully terminates the connection. The client is notified.
B. Server physically disconnects from the network. How does the client know?
C. Server program shuts down without a graceful disconnect. How does the client know?