> As far as threads.. Was thinking that TWSocket itself would not be in a > thread.. However, the packet processor and relay code would be.. More > specifically, at the server level, buffer the incoming data to some > pre-determined amount, then fire off a thread to process that buffer..
Using a thread for offloading blocking processing is a good thing. Using a single thread for all TWSocket stuff is also good if you have a really fast network. In that case using the main thread for both GUI and network I/O woul make the application less responsive to the user, therefore a worker thread for network I/O is good. With slow network (depending on your hardware, slow mean something below 10 Mbps) the main thread is frequently enough for both the GUI and network I/O. It is not the number of client which matters, it is the global thruput which cannot be higher than cable thruput of course. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be ----- Original Message ----- From: "Michael Preslar" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Sunday, October 29, 2006 11:18 PM Subject: [twsocket] Thread Opinion > I know, I know, its been said many times on this mailing list that > threads are usually a Bad Thing, and that TWSocket in async mode can > handle most anything with ease.. > > But still, I have to ask for you guys' opinion.. > > The client server would not be multi-threaded.. Theres just not enough > data to worry about for the clients.. > > But the server.. Each client would be sending data packets, 1024 bytes > or less, and quite possibly very rapid fire. > > From there, the server takes the incoming packet, parses it, makes > changes to the local data stores, and then relays the packet (sometimes, > a modified packet) on to all other clients that are connected. > > As far as threads.. Was thinking that TWSocket itself would not be in a > thread.. However, the packet processor and relay code would be.. More > specifically, at the server level, buffer the incoming data to some > pre-determined amount, then fire off a thread to process that buffer.. > > Thoughts? > > -- > Michael > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be