This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have recently expanded my JAVA'ing from doing basic applets for my sites and such, into doing a lot of web based applications. I have been trying to figure out how to get multiple people to connect to a java server at once. I tried using threads, and thought I was on the right track, but i keep hitting dead ends. Any help would be great.
If you're writing your own server - a fun and educational experience - you'll have a ServerSocket somewhere that does accept(). This gives you a socket that is connected to the client. If you put all processing of the socket on another thread, the main thread can be ready to accept another connection in no time at all. Here are few lines from my Wiki server ...
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