Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

803 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