Problem with "read from socket"

Dar Scott dsc at swcp.com
Tue Jun 29 11:48:05 EDT 2004


On Jun 29, 2004, at 10:02 AM, maxence.bernard at ensi-bourges.fr wrote:

> I have found where is the problem : I have a read instruction which 
> blocks :
>
> "read from socket socket1 until empty"
>
> You said that it didn't block, but for me, it always is waiting, and 
> the
> program continues when I move the mouse or click on the stack. A bug ?

Maybe.

I have been using OS X and Windows.  I just checked this on OS X with 
Rev 2.2.

I have a vague memory of "read from socket socket1" working, but when I 
tried it, it did not work.  Maybe that got changed.

Throughout Revolution there is confusion concerning these:

read until eof character
read until end of stream/file/channel
read until the buffer is empty
read until the buffer is not empty and then get all of the buffer, too

I think most of the folks who do a lot of sockets scripting use 'with 
message', so those might be more robust and you may have to do that.  
The compiler allows 'until empty' to be optional in that case.  Try 
both if need be.

Also, add an entry in bugzilla.  Mention that somebody said it works on 
OS X with Revolution 2.2.

Dar Scott



More information about the use-livecode mailing list