Socket Server for game - too many threads?

Reply

Join Date: Mar 2008
Posts: 27
Reputation: PC_Nerd is an unknown quantity at this point 
Solved Threads: 0
PC_Nerd PC_Nerd is offline Offline
Light Poster

Socket Server for game - too many threads?

 
0
  #1
Jun 28th, 2008
Hi.


*** SHORT QUSETION:
Is there a way I can run a <large> socket server withought having to have a thread for each client/socket created?

***LONGER EXPLAINATION

IVe recently written a small network program, that sends messages over TCP or UDP... depending on user input. I want ot adapt that and another small game i made ( just a basic Tank OOP thing)... into a network game.

Mainly as an excersise for me i want to build this into a mini network game - however if I use TCP sockets, then I have to have a thread for each socket.. corrrect? So if ive got 100 people connected to my game (for example), then thats 101 threads isnt it?

Is there a way that I can get one socket ( or simply attach all of the sockets (ie, one socket for each person cnnected)), to <something> that will just continueally check for input, withought having to runhundreds of threads. Im looking at the server side here..... so the game isnt really that important, its managing all the threads.


Thanks in advance,
PC_NERD
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC