I have written simple forward proxy server which accepts the connection on range of ports from the client and forwards them.
After the connection is established, I add them to a socket list which I monitor using select(). I do know better way could be using read() with one thread per fd.
I have some restrictions because of which I can not use one thread per connection and so am using select(). But then I dont get to know if client has closed the connection as select does not tell me. Is there any way to figure that out?