IAC (native port listening not possible): howaboutexternals/named pipes?

Dar Scott dsc at swcp.com
Fri Apr 23 17:17:45 EDT 2004


On Friday, April 23, 2004, at 09:17 AM, David Bovill wrote:

> Thanks again. Read it - nice and clear. So I guess you could just 
> write a daemon that  continually checks for input using either open 
> file or open driver for read.

Try open file first.  You might want to try a quick test with a named 
pipe and see if it works as expected.

> Not as elegant (or fast I would think), as having the equivalent to 
> accept with a message being sent when something comes in?

Unfortunately, only socket I/O has message callback I/O.

> I guess this is what writing a small external would do -  wrap the C 
> "receiver code" in the external API stuff... and hopefully be able to 
> define / send a message when something comes in?

It might be easier to poll here, too.  You could create a thread to 
receive data, but there is no evidence that calling back into the 
engine is thread-safe.  On some platforms you might be able to sync 
with the event messages and assume the calling back is safe at that 
point, but I have not done it.  Yet.  There might be a good way to do 
this that I'm missing.

I'd try polling named pipes and see how the performance goes.

Dar Scott



More information about the use-livecode mailing list