Re: [twsocket] TWSocketThrdServer

2007-10-16 Thread Ana Onarres
09:38:21 -0400 Subject: Re: [twsocket] TWSocketThrdServer QUOTE: Anne What difference is between to use TWSocketThrdServer and use TWSocketServer with ClientThread? Which is better for me? END. TWSocketThrdServer spawns a new thread for each incoming client (or a new thread

Re: [twsocket] TWSocketThrdServer

2007-10-16 Thread DZ-Jay
On Oct 16, 2007, at 07:35, Ana Onarres wrote: I am using the TWSocketServer and have seen the examples. I have 2 doubts: - It is necesary to create the ClientThread and TThrdSrvClient. In the first one, I put the code for receiving data for client, send the server and then send data

Re: [twsocket] TWSocketThrdServer

2007-10-16 Thread Ana Onarres
15:54:50 +0200 Subject: Re: [twsocket] TWSocketThrdServer Ana Onarres wrote: Hello,I want to create a server socket that accepts connections of several clients. Every client, first, send data to server. This data are validated for server and then the server sends data to the client

[twsocket] TWSocketThrdServer

2007-10-15 Thread Ana Onarres
Hello, I want to create a server socket that accepts connections of several clients. Every client, first, send data to server. This data are validated for server and then the server sends data to the client. What difference is between to use TWSocketThrdServer and use TWSocketServer with

Re: [twsocket] TWSocketThrdServer

2007-10-15 Thread Arno Garrels
Ana Onarres wrote: Hello, I want to create a server socket that accepts connections of several clients. Every client, first, send data to server. This data are validated for server and then the server sends data to the client. What difference is between to use TWSocketThrdServer and use

Re: [twsocket] TWSocketThrdServer

2007-10-15 Thread [EMAIL PROTECTED]
QUOTE: Anne What difference is between to use TWSocketThrdServer and use TWSocketServer with ClientThread? Which is better for me? END. TWSocketThrdServer spawns a new thread for each incoming client (or a new thread after the maximum amount of clients per threads has been reached).

Re: [twsocket] TWSocketThrdServer friendly notice when disconnecting.

2007-10-11 Thread Wilfried Mestdagh
Hello dz, You have to loop through the connected clients to send them a message. and send the shutdown. Take care that clients may be disconnected while in the loop, so something like this: for n := 0 to Srv.ClientCount - 1 do try Srv.Clients[n].SendStr('bye'#13#10);

Re: [twsocket] TWSocketThrdServer friendly notice when disconnecting.

2007-10-11 Thread DZ-Jay
Thanks, Wilfried. That's what I'm doing now. However, I'm doing it from the end of the Execute() method of the worker thread, right before destroying the server, like this: Procedure WorkerThread.Execute; Begin _InitializeSrv(); // create Try Srv.MessageLoop(); Finally Try

Re: [twsocket] TWSocketThrdServer friendly notice whendisconnecting.

2007-10-11 Thread Arno Garrels
DZ-Jay wrote: Thanks, Wilfried. That's what I'm doing now. However, I'm doing it from the end of the Execute() method of the worker thread, right before destroying the server, like this: Procedure WorkerThread.Execute; Begin _InitializeSrv(); // create Try

Re: [twsocket] TWSocketThrdServer friendly notice whendisconnecting.

2007-10-11 Thread [EMAIL PROTECTED]
--- QUOTE: SZ If you do not want the ability to use multi-cores for communication threads, then async is the way to go. But IMO, it is an ill design since chipmakers are talking about 64-core CPUs and 10Gbps networks. --- END. Thanks, SZ. At this point I'm not so much concerned about complexity

Re: [twsocket] TWSocketThrdServer friendly notice whendisconnecting.

2007-10-11 Thread Fastream Technologies
On 10/11/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: --- QUOTE: Arno Garrels This is untested code. Also FThreadList has to be made public. Note that OnMessage would fire in different thread contexts but a single handler for all is fine. Hope this helps. --- END. I'll look into it.

Re: [twsocket] TWSocketThrdServer friendly notice whendisconnecting.

2007-10-11 Thread Arno Garrels
Fastream Technologies wrote: I test my ICS-based MT proxy with 20k connections on our dual-core system. It performs 2GBps, local-to-local. So that's one CPU performance basically since the tester also uses CPU! I would not imagine such performance with single thread. Those numbers don't tell

[twsocket] TWSocketThrdServer stuck in destructor loop when killing threads

2007-10-04 Thread [EMAIL PROTECTED]
Hello: I'm having a problem with the TWSocketThrdServer. My application has a worker thread that contains a TWSocketThrdServer member to handle all incoming requests. When the main thread finishes, it sends a WM_QUIT message to the worker thread, which then finishes and frees the

Re: [twsocket] TWSocketThrdServer stuck in destructor loop when killing threads

2007-10-04 Thread Wilfried Mestdagh
Hello dz, Change this. Its from top of my head so can be syntax errors. You have to move the destroy of the server also in the Execute mehod: Destructor TServerThrd.Destroy; Begin Try // this must in the Execute method // If Assigned(FSocketSrv) Then Begin //

Re: [twsocket] TWSocketThrdServer stuck in destructor loopwhenkilling threads

2007-10-04 Thread Arno Garrels
[EMAIL PROTECTED] wrote: Now, since all exceptions are being swallowed by the TWSocket component, if I need to kill the entire app from, say, an event within the TWSocketThrdSrv (for example in OnBgException), should I post a message to the main thread, or is there a better way? You may want

Re: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed.

2007-10-03 Thread Francois Piette
Message - From: [EMAIL PROTECTED] To: twsocket@elists.org Sent: Wednesday, October 03, 2007 12:04 AM Subject: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed. Hello: I'm using TWSocketThrdServer and processing client data from within the OnDataAvailable event

Re: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed.

2007-10-03 Thread Olivier Sannier
(Multi-tier framework, freeware) http://www.overbyte.be - Original Message - From: [EMAIL PROTECTED] To: twsocket@elists.org Sent: Wednesday, October 03, 2007 12:04 AM Subject: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed. Hello: I'm using

Re: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed.

2007-10-03 Thread Arno Garrels
-tier framework, freeware) http://www.overbyte.be - Original Message - From: [EMAIL PROTECTED] To: twsocket@elists.org Sent: Wednesday, October 03, 2007 12:04 AM Subject: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed. Hello: I'm using

Re: [twsocket] TWSocketThrdServer - BogusOnDataAvailabletriggeredwhen Closed.

2007-10-03 Thread Wilfried Mestdagh
Hello dz, Client.SendLine('-ERR Closing connection.'); Client.Shutdown(1); // Or CloseDelayed() ...? Yes. This way you are sure that the string will be received by the other end. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz --

[twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggered when Closed.

2007-10-02 Thread [EMAIL PROTECTED]
Hello: I'm using TWSocketThrdServer and processing client data from within the OnDataAvailable event handler (client is set to LineMode=True). I've noticed that if the data transaction is completed and I call Client.Close from within this event, the event is called again with the previous

[twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread [EMAIL PROTECTED]
Hello: I using TWSocketThrdServer in a server application and was wondering if there is a recommended method to call for a graceful shutdown -- one that will stop listening when all current connections are completed. Thanks, -dZ. -- To unsubscribe or change your settings for

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Wilfried Mestdagh
Hello dz, Just call Close method. server will stop listening. Note that calling Close will not stop current connections, it only stops listening. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Friday, September 28, 2007, 17:44, [EMAIL

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Arno Garrels
[EMAIL PROTECTED] wrote: Hello: I using TWSocketThrdServer in a server application and was wondering if there is a recommended method to call for a graceful shutdown -- one that will stop listening when all current connections are completed. Call Close, that just stops listening,

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread [EMAIL PROTECTED]
:[EMAIL PROTECTED] Sent: 9/28/2007 12:03:57 PM To : twsocket@elists.org Cc : Subject : RE: Re: [twsocket] TWSocketThrdServer graceful shutdown Hello dz, Just call Close method. server will stop listening. Note that calling Close will not stop current connections, it only stops listening

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Wilfried Mestdagh
Hello Arno, Most likely Wilfried is faster again ;-) most of the time you are faster :) --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please goto

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Arno Garrels
: RE: Re: [twsocket] TWSocketThrdServer graceful shutdown Hello dz, Just call Close method. server will stop listening. Note that calling Close will not stop current connections, it only stops listening. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Arno Garrels
Wilfried Mestdagh wrote: Hello Arno, Most likely Wilfried is faster again ;-) most of the time you are faster :) Isn't this list great? Where else do you get faster support for free software? g -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- To unsubscribe

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Wilfried Mestdagh
Friday, September 28, 2007, 20:36, Arno Garrels wrote: Wilfried Mestdagh wrote: Hello Arno, Most likely Wilfried is faster again ;-) most of the time you are faster :) Isn't this list great? Where else do you get faster support for free software? g Indeed. Sometime I have the feeling

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread [EMAIL PROTECTED]
--- Original Message --- From: Arno Garrels[mailto:[EMAIL PROTECTED] Isn't this list great? Where else do you get faster support for free software? g Yes, it is. Thank you both for your quick responses. -dZ. -- To unsubscribe or change your settings for TWSocket mailing