![]() |
| | #1 |
| Registered User Join Date: Oct 2009
Posts: 15
| Multi-client/Server design I think that creating a thread for each client is bad practice but on the other side I think that's the best way of making it work. Instead I can create a thread for each room and use select to unblock the server from I/O with the clients. waitting for your opinion... |
| tmcp is offline | |
| | #2 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 3,020
| A multi-threaded server approach is very common, and is usually easier to implement than a non-blocking server. Obviously, if you plan on having thousands of clients connecting at a time, then spawning a new thread for each one is not a good idea.
__________________ bit∙hub [bit-huhb] n. A source and destination for information. |
| bithub is offline | |
| | #3 |
| +++ OK NO CARRIER Join Date: Oct 2001
Posts: 10,639
| How about polling and non-blocking sockets? Quzah.
__________________ Hundreds of thousands of dipshits can't be wrong. Are you up for the suck? |
| quzah is offline | |
| | #4 |
| Registered User Join Date: Oct 2009
Posts: 15
| |
| tmcp is offline | |
| | #5 |
| +++ OK NO CARRIER Join Date: Oct 2001
Posts: 10,639
|
__________________ Hundreds of thousands of dipshits can't be wrong. Are you up for the suck? |
| quzah is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Design for Multi Version of a File. | bean66 | C++ Programming | 2 | 03-31-2009 01:46 PM |
| which design is better to wrap another class instance | George2 | C++ Programming | 7 | 04-13-2008 12:27 AM |
| Implementing Inheritence into your design | bobthebullet990 | C++ Programming | 6 | 08-05-2006 04:40 PM |
| Client/Server program design | Coeus | C++ Programming | 4 | 01-05-2002 01:07 AM |