Hi, Wilfried Mestdagh wrote: > Hello Olivier, > > >> That's what I thought, but then again, this means I need to have a >> buffer of my own, and I have no idea which size it should be. 1k, 10k, more? >> > > Yes. TWSocket is designed to buffer incoming data for you if you use > LineMode. That is when you have your data terminated with a certain > character (or a string of characters). If you dont use LineMode then yes > you have to buffer on your own. > I can't use LineMode, what is transferred is purely binary.
>> I know that, but with 100%CPU usage, the handling of messages is stopped >> anyway as well as no other thread will be able to take control. Well, >> maybe on a multi core, but not on single core machines. >> > > Agree, but there is also a componentOptions property wsoNoReceiveLoop > which will fire OnDataAvailable again using a custom message handler. In > that case message pump stay working. > I rewrote my code to have its own internal buffer AND use wsoNoReceiveLoop because it ensures my message pump is called, but with this property set, I might not actually have to use my own internal buffer and rely on the one from the API itself. I tried it, it works fine, but is it be a "nice" thing to do? Are there any risks associated with this behavior? Thanks for the answers. Regards Olivier > --- > Rgds, Wilfried [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > http://www.mestdagh.biz > > Wednesday, September 26, 2007, 15:38, Olivier Sannier wrote: -- 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