I'd like to implement TCP server that would allow more than one client to connect on TCP socket.
First question is how server figures out that client has disconnected ?
Second is how to write robust TCP server that would allow connection of more than one client.
Are threads optimal solution? What to put in those threads?
I'd kindly ask if anyone is also willing to post some code examples...