I was wondering how can I change this from 1 socket to lets say 20. Do I just do a loop?
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
posted
0
Ah, this is clearer than the copy of the question over in the Sockets forum. The sherrifs will probably close this one, but I'll toss something in first.
You have a socket client that issues a GET to a web server somewhere and displays the results. I'd get this code out of main and into an instance method. Then we could do something like:
You could do that in a loop neatly enough. Once that's working for you, we can talk about threads and doing several at once.
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