View Single Post
Old May 11th, 2008, 7:24 PM   #6
Fall Back Son
Hobbyist Programmer
 
Join Date: Oct 2006
Posts: 204
Rep Power: 2 Fall Back Son is on a distinguished road
Re: Confused about simple multi-threaded server

Quote:
Originally Posted by Freaky Chris View Post
Perhaps you would be better of having the main class run an infinite loop accepting connection from clients. Once it has recieved a client from socket.accept() the you can pass that to a new Threaded class that deals with all of the input and outputs to that socket.
It is already doing that lol. Recheck the code. Main has a while loop that is always true so that it can connect to multiple clients. A new thread is spun off for each client and the run method is invoked.
Fall Back Son is offline   Reply With Quote