Hi Francois,

Thanks for your prompt reply.

>> I'm getting error 10035  (operation would block) and
>> wondered why this would happen now and not
>> previously.
> 
> Error 10035 is not really an error when using non blocking socket. It just 
> means nothing is ready to be read.
> Instead of ReceiveStr, I suggest you use Receive where you have better 
> control and is faster since it doesn't involve the memory allocation needed 
> for strings.

I actually took the code for ReceiveStr from the ICS source and copied 
that into my source, 'cos I couldn't step through the ICS code.  That 
calls Receive anyway, so there's no difference in function, only in 
performance - and I'm only concerned with function for now :)

>> Does anyone have any suggestions about what might be going wrong here?
> 
> The most common source of probelm is calling the message pump 
> (ProcessMessages and the like) directly or indirectly (For example with a 
> modal form or a simple ShowMessage).

Hmmm, I'm pretty sure I'm not doing that, but I'll check just in case.

It doesn't explain why doing the AnsiString msg = 
((TWSocketClient*)Sender)->ReceiveStr() works though.

Regards,

Bevan

-- 
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

Reply via email to