polling only on socket, or can there be a trigger?

Mark Waddingham mark at livecode.com
Fri May 8 10:48:24 EDT 2015


On 2015-05-08 16:40, Dr. Hawkins wrote:
> accept and open socket cause routines to execute, and have callbacks.
> 
> Is there a way either end to be triggered when receiving a message 
> other
> than by polling/reading to see if anything is there?

Both 'read' and 'write' have 'with message' forms so that a callback 
gets invoked when the action you asked for completes.

In particular:

   read from socket tSocket until empty with message "giveMeData"

Will cause "giveMeData" to be sent as soon as any data arrives on the 
socket.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list