File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Increasing sockets 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 "Increasing sockets" Watch "Increasing sockets" New topic
Author

Increasing sockets

Steven Alvarez
Ranch Hand

Joined: Nov 01, 2006
Posts: 66
How does one increase the amount of sockets used in a socket? For example If I wanted to make the socket by increasing it from using 1 socket to lets say 20 sockets?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Can you show some code where you're using sockets and describe what happens when you don't have enough?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Steven Alvarez
Ranch Hand

Joined: Nov 01, 2006
Posts: 66
I think I found out I need something called multithreading. I want to make more then one connection to a https site.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Yup, threading will let you retrieve from several sites or pages at once. Given my home PC and network and the program I wrote, I find it useful to run maybe four at once, but more than that get in each other's way.

Try the Sun Concurrency Tutorial for a great introduction to threads. You'll want to capture the results from each thread, so you might use join() or a cool new class like Future. Work through the tutorial and see if those words make sense then.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Increasing sockets
 
Similar Threads
JPA in a socket sever
Reading from Streams during connection timeout
Specifying local and network "mode"
sockets
NIO Channel -Object Transfer