aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Pool of socket connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Pool of socket connections" Watch "Pool of socket connections" New topic
Author

Pool of socket connections

Uma Viswanathan
Ranch Hand

Joined: Jun 14, 2001
Posts: 126
The server is multi-threaded.
Instead of creating a socket connection for each request, i want to maintain a pool of socket connections? If one client has done with its work, then i want to restore the connection and use for another client.
Could someone explain me how to do pool of socket connections?
Thanks a lot.
aditya mahajan
Greenhorn

Joined: Jul 13, 2001
Posts: 8
why do you want to do something like this. The system will itself allocate the empty ports to the new clients and when a client disconnects the port that it was connected to becomes free
So you do not have to explicitely maintain a pool of ports
Originally posted by Uma Viswanathan:
The server is multi-threaded.
Instead of creating a socket connection for each request, i want to maintain a pool of socket connections? If one client has done with its work, then i want to restore the connection and use for another client.
Could someone explain me how to do pool of socket connections?
Thanks a lot.

parul patidar
Ranch Hand

Joined: Sep 07, 2001
Posts: 53
i dont think u need to create a new connection for each request
it is needed in URLConnection not socket connection
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pool of socket connections