On Oct 8, 2010, at 5:29 AM, Len Morgan wrote:
I wish it was that simple but the length of the message is only in
one byte so it's pretty hard to swap.
Yeah, I guess the high byte is always zero.
I never use read by number of bytes. It is not that I have seen
problems with it, I just became comfortable doing things another way.
I usually use 'read from <socket> with message <callback>'. I don't
think the 'with message' is important for the behavior I see. This
reads whatever is in the buffer. I think some people use an idiom of
"for 0" in the command for this.
I collect bytes into a buffer until there is a whole message and then
pull that off, in a sense, doing myself what you are looking for
LiveCode to do.
You might be able to use 'read from <socket>' as a way to prevent the
timeouts and to diagnose the problem. This will show if there are
problems with the frame length.
Dar Scott
--
**************************************
Dar Scott
Dar Scott Consulting and darzLAB
8637 Horacio Place NE
Albuquerque, NM 87111
Lab, office, home: +1 505 299 9497
Fax: try 299-9497
Skype/Google: lets set up a time
http://www.swcp.com/dsc
d...@swcp.com
Computer programming and tinkering
**************************************
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution