A message for data waiting at a socket?

Doug Lerner doug at webcrossing.com
Sat Jan 3 00:00:08 EST 2004


On 1/3/04 1:05 PM, "Dar Scott" <dsc at swcp.com> wrote:

> 
> On Friday, January 2, 2004, at 08:40 PM, Doug Lerner wrote:
> 
>> Wouldn't that just signal a message when reading data from the socket
>> is
>> complete?
> 
> Yes, but this one is complete when the buffer is non empty:
> 
>   read from socket theSocket with message socketData
> 
> Does that sound like what you want?
> 
> (This may not correspond to a push from the other side, but it often
> will.)

I'm not sure I am following.

Isn't the only difference between

(1) read from socket theSocket with message socketData

and

(2) read from socket theSocket

that (1) returns immediately and then sends the message socketData when the
read is complete and (2) pauses the handler while it is reading the data?

Neither one seems to have anything to do with the push of data from the
other side, does it? I mean, in both cases you still have to invoke the
"read from socket" command again somehow, like I am already doing, wouldn't
you?

doug




More information about the use-livecode mailing list