Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-17
2
Medium Priority
?
788 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:HEMANTBELLANI
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1500 total points
ID: 21802666
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 21811274
:-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question