Re: [twsocket] Using TWSocketThrdServer

2006-06-08 Thread Francois Piette
> > Are you really sure that you need multi-threading at all? > > TWSocketServer can handle hundreds of clients w/o any problem in a > > single thread, makes life much easier ;-) > I will have to support up to 100 clients at a time. Each client will > send about 1 TCP packet per second. Fairly low

Re: [twsocket] Using TWSocketThrdServer

2006-06-08 Thread Stefan Paege
> Are you really sure that you need multi-threading at all? > TWSocketServer can handle hundreds of clients w/o any problem in a > single thread, makes life much easier ;-) I will have to support up to 100 clients at a time. Each client will send about 1 TCP packet per second. Fairly low traffic.

Re: [twsocket] Using TWSocketThrdServer

2006-06-08 Thread Arno Garrels
Stefan Paege wrote: > Francois Piette schrieb: >> I can't answer precisely to your question. I should have a look at >> the source code to see where the critical sections are placed. >> I never do this kind of programming. I organize inter-thread >> communication using messages. Never share any com

Re: [twsocket] Using TWSocketThrdServer

2006-06-08 Thread Stefan Paege
Francois Piette schrieb: > I can't answer precisely to your question. I should have a look at the > source code to see where the critical sections are placed. > I never do this kind of programming. I organize inter-thread communication > using messages. Never share any component between two threads

Re: [twsocket] Using TWSocketThrdServer

2006-06-08 Thread Francois Piette
er. I separate the tasks into black boxes communicating thru simple messages. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Stefan Paege" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Wednesday, June 07, 2006 4:10 PM Subject: Re: [tws

Re: [twsocket] Using TWSocketThrdServer

2006-06-07 Thread Stefan Paege
One more thing: When I want to send data from the app containing the TWSocketThrdServer to one of its clients do I have to be "thread aware" or can I just do a WSocketThrdServer1.Client[X].SendStr(MyData); from my main thread? Are there any other traps regarding the components thread handlin

Re: [twsocket] Using TWSocketThrdServer

2006-06-06 Thread Stefan Paege
Francois Piette schrieb: > There is no "best" place. Using the events, you can plug your code when the > component is instanciate or when the user as connected. You select which one > better fit your needs. Having a look at the component source code may help > you take the right decision. Ok, the

Re: [twsocket] Using TWSocketThrdServer

2006-06-06 Thread Francois Piette
e 06, 2006 3:03 PM Subject: [twsocket] Using TWSocketThrdServer > Hi, > I need to set up a multithreaded TCP Server and thought about using ICS. > I found an interesting example using the TWSocketThrdServer component > (ThrdSrvV3.bdsproj). Working through the code I see that the > OnC

[twsocket] Using TWSocketThrdServer

2006-06-06 Thread Stefan Paege
Hi, I need to set up a multithreaded TCP Server and thought about using ICS. I found an interesting example using the TWSocketThrdServer component (ThrdSrvV3.bdsproj). Working through the code I see that the OnClientCreate and the OnClientConnect event contain almost identical code for the conf