How to know when to close socket when dealing with HTTP clients?
- by Y_Y
Hi,
How can I know when to close the socket of an HTTP client (I mean a browser is connecting to my TCP socket server). Everything works perfect but in other for the browser to show what the server has sent, i have to shutdown the server (or call socket.Close()).
It works fine if I call (socket.Close()) but I just don't know when.? I don't want to call close in a middle of a request otherwise the browser would have to reload to connect to the server again.