I now trying to implement sync socket actions (I'll need to make DLL so
async model doesn't fit).
procedure TSockClient.Request;
begin
if State <> wsConnected then
begin
Connect;
while not (State in [wsConnected, wsClosed]) do
MessagePump;
if State <> wsConnected then
begin
> *Subject:* Re: [twsocket] Creatively annoying a host
> > I could leave the connection open without sending a response?
> >
> Just delay the answer for a couple second, this will slow down the
> probing.
I think keeping the client connection open as long as possible, sending
random HTTP headers
2Arno:
>No problem to use async in a DLL, have a look at OverbyteIcsDll1 demo,
>it shows a multi-thread capable implementation. If you don't need MT
>have a look at the console demos, those with "con" in name, the same
>princple works in a DLL as well.
Thanks! I digged into OverbyteIcsDll1 demo an
>I could leave the connection open without sending a response?
You may delay it for, say, 5 sec. But then I guess the vulnerability to DDOS
increases (thousands of connections simultaneously). I'm not sure how much of
them is possible.
>Or send a vast amount of rubbish data in response?
Maybe — i
2Arno:
No problem to use async in a DLL, have a look at OverbyteIcsDll1 demo,
it shows a multi-thread capable implementation. If you don't need MT
have a look at the console demos, those with "con" in name, the same
princple works in a DLL as well.
Thanks! I digged into OverbyteIcsDll1 demo and g
>I could leave the connection open without sending a response?
You may delay it for, say, 5 sec. But then I guess the vulnerability to
DDOS
increases (thousands of connections simultaneously). I'm not sure how much
of them is possible.
Well, this is possible, depending on how their are organiz
>You get the best isolation from
>the host application by creating a worker thread and run most of your code
>in the context of this thread.
Okay, I think I got the structure which seems correct.
As I need several sockets for several purposes, I can't use socket's message
loop (I don't want to c
>You get the best isolation from
the host application by creating a worker thread and run most of your code
in the context of this thread.
Okay, I think I got the structure which seems correct.
As I need several sockets for several purposes, I can't use socket's
message loop
(I don't want to cr
>I think you should use only one
thread for all socket operation within your application and one thread for
each lengthy processing/computation you have to do. The rule is to avoid
lengthy processing within the thread doing communication.
Yes, that's exactly I intended to do except I don't need
See above. Pausing/resuming the socket shouldn't be used, specially if you
have your own worker thread. Just have the socket event handler blocked
waiting for some synchronization object.
You mean blocking the entire message loop?
Yes, indeed. If you don't want any socket event while outside o
Hi Everyone
Does anyone have ideas why TIcsWndControl.ProcessMessages could hang sometimes
when socket is used in separate thread?
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http:/
Does anyone have ideas why TIcsWndControl.ProcessMessages could
hang sometimes when socket is used in separate thread?
Have you followed the rules: create TWSocket within the thread's execute
method OR call ThreadAttach ?
--
francois.pie...@overbyte.be
The author of the freeware multi-tier mi
>> Does anyone have ideas why TIcsWndControl.ProcessMessages could
>> hang sometimes when socket is used in separate thread?
>Have you followed the rules: create TWSocket within the thread's execute
>method OR call ThreadAttach ?
Yes socket is created within threads execute method, and it works
13 matches
Mail list logo