Problem in Implementing HTTP/1.1 keep alive behavior in a multithreaded Webserver using thread pooling

Hi Friends,
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..
WebServer.txt
HEMANTBELLANIAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
Well any kept alive connection should not enter at the same point, as the socket should be still connected. If it's from another thread at the same client, i don't think socket reuse is expected
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.