> Alternatively you start a timer with short interval (100 ms) when 
> you receive data, reset the timer each time you receive data and 
> keep adding the data to a buffer.
> Once the timer triggers you can assume you have all data. This way 
> it keeps working of the XML layout changes :)

A timer is fine to handle lost connections where a partial record may have been
received without an expected record end, but is quite an overhead (particularly
with multiple clients) where there are better record ends: XML end tag, maximum
expected record length, CRLF, blank line, etc.  I variously use them all to
avoid buffering too much data. 


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://www.overbyte.be

Reply via email to