I have written a code for a multithreaded Webserver using thread pooling in java. I need to implement HTTP/1.1 keep alive behavior in it. The code has been attached with the question. As far as I understand it means to reuse the sockets that are already opened for the request coming from the same browser. But everytime, a request comes a new socket is returned when the serverSocket.accept() executes. I need to reuse the socket for the request from the same browser within a certain specified timeout limit.
I would apprecite any help in this regard..