Anton Sviridov wrote:
> Hello, Wilfried!
> You have calmed me :)
> Arno Garrels [TeamICS] wrote:
>> As I understand the OP calls receive multiple times in
>> OnDataAvailable which is not a good idea.
> So, each Recv "launches" one more OnDataAvail in the future? 

AFAIK no, only if you do not read all available data OnDataAvailable 
will trigger again.

> If so,
> can I easily read from socket block-by-block? Here's what i do for
> now: 

You should read from the socket once in OnDataAvailable.
OnDataAvailable will trigger again when new data is available or 
in case you did not read everything. ICS uses asynchron sockets which
requires messages being processed. Thus calling Receive multiple times
in a loop in on DataAvailable would not work properly.
Arno Garrels
To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to