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);
Srv.Clients[n].Shu
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
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
> Srv.
On Oct 11, 2007, at 06:47, Arno Garrels wrote:
> Iterating thru Srv.Clients is not the way to go!! It is not
> thread-save and will most likely throw strange AVs. Instead
> iterate thru the thread-list and post a custom message to each
> thread, the inside the thread iterate thru each thread's
>
DZ-Jay wrote:
> On Oct 11, 2007, at 06:47, Arno Garrels wrote:
>
>> Iterating thru Srv.Clients is not the way to go!! It is not
>> thread-save and will most likely throw strange AVs. Instead
>> iterate thru the thread-list and post a custom message to each
>> thread, the inside the thread iterate
Btw: Should read:
TMessageEvent = procedure(Sender: TObject; var Msg: TMessage; var Handled:
Boolean) of object;
--
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
--- 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.
--- QUOTE: Arno Garrels
I think it isn't very fast, I tested once
--- 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 (
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 in
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.
Best Regards,
SZ
On 10/11/07, [EMAIL PROTECTED] <[EMAIL
Hello:
Although impressive, that type of performance is
out of the scope of my application, which won't be
handling more than 100 (but mostly dozens)
connections at a time. I guess TWSocketServer is the
way to go for me.
Thank you all for the help,
-dZ.
>--- Original Message --
Hello:
Ok, now that I'm switching to TWSocketServer, my
original question stands. Since all clients will run
within the same thread context, then would it be safe
to send the disconnect notice like Wilfried
originally suggested? For example:
Procedure WorkerThread.Execute;
Begin
_Initialize
Hello,
Please find my code at http://www.fastream.com/ics/WebStressTesterSRC.zip .
Basically it is like this:
void __fastcall TesterThread::startClients(void)
{
clientList = new TList();
TSslHttpCli *bufferClient;
for(int i = 0; i < clientsPerThread; ++i)
{
bufferClient = new TSslHttpCli(
[EMAIL PROTECTED] wrote:
> Hello:
>Although impressive, that type of performance is
> out of the scope of my application, which won't be
> handling more than 100 (but mostly dozens)
> connections at a time. I guess TWSocketServer is the
> way to go for me.
Yes I think so. You only must ensure
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 te
Sure but I do not have a serious async server. You can download our MT
server from our web site anytime for a test.
Regards,
SZ
On 10/11/07, Arno Garrels <[EMAIL PROTECTED]> wrote:
>
> Fastream Technologies wrote:
> > I test my ICS-based MT proxy with 20k connections on our dual-core
> > system
IOW, there are more messages pumped after OnRequestDone which SHOULD BE
PROHIBITED OTHERWISE USE IN MT ENVIRONMENTS WOULD NOT BE POSSIBLE. Francois
can you fix this bug per our consultancy agreement?
Best Regards,
SZ
On 10/11/07, Fastream Technologies <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> P
Fastream Technologies wrote:
> if(method == "GET")
> bufferClient->GetASync(); // here gives "Busy" error, WHY? ISN'T
> THIS THE PROPER WAY TO USE THE COMPONENT??
I cannot reproduce this? Any special environment required?
--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.ht
Of course I use:
USE_SSL;NO_DEBUG_LOG;NOFORMS;SECURITY_WIN32;NO_ADVANCED_HTTP_CLIENT_FEATURES
in defines.
Thanks,
SZ
On 10/11/07, Arno Garrels <[EMAIL PROTECTED]> wrote:
>
> Fastream Technologies wrote:
> > if(method == "GET")
> > bufferClient->GetASync(); // here gives "Busy" error, WHY?
19 matches
Mail list logo