Anton S. wrote:
> I now trying to implement sync socket actions (I'll need to make DLL
> so async model doesn't fit).

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. 

Arno Garrels 

> procedure TSockClient.Request;
> begin
>  if State <> wsConnected then
>  begin
>    Connect;
>    while not (State in [wsConnected, wsClosed]) do
>      MessagePump;
>    if State <> wsConnected then
>    begin
>      //..
>      Exit;
>    end;
>  end;
> ...send request...
> end;
> If I try to connect to not opened addr-port, the error is transferred
> to OnSessionConnected. But I'd like to have result code of the last
> operation in the socket's field without adding an OnSessionConnected
> handler. LastError is what I want but it's not changed on session
> connect/disconnect. If that hasn't been done by intention, I guess
> that should be implemented.     
> --
> Anton
To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to