Solved

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

Posted on 2008-06-17
2
751 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 500 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now