On Jun 28, 2004, at 2:24 PM, [EMAIL PROTECTED] wrote:

Your script is waiting for two bytes.

So, is there a way to stop this waiting, otherwise my application doesn't
continue. How could I interrupt the "read from socket" instruction with
the socketTimeout message ?

First, I need to say that I rarely use socket I/O without "with message", so I may be off here.


One way is to switch to the "with message" style, which can be wordy and breaks up your logic and thus can be awkward. Even so, I recommend this.

The other method is to use "until empty" which will give you whatever is in the buffer and will return immediately. I mentioned that in mail I just sent.

(One might guess it will return empty every time since it will match empty at the start of the buffer, but that is not the case. One might guess that it will wait until the other end closes since empty is said to be equivalent to eof, but that is not the case either.)

Dar Scott

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to