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

David Bovill david at opn-technologies.com
Sat Apr 24 06:06:42 EDT 2004


Dar Scott wrote:

> 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.

OK

>> 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.


Sounds like open driver / file, would be a good candidate for future 
releases...

>> 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.

Thanks - will report back when / if we get it working!


More information about the use-livecode mailing list