I think this is exactly the type of thing a UCSPI setup should be useful
for, but I lack the knowledge about Unix stuff to know where to begin.

I want to use `s6-tlsclient` to connect a Uxn program to the internet. My
thinking is this would save me from having to implement a networking device
in a custom/modified Uxn emulator, by using the existing devices in a
creative way. Then the Uxn program can just talk HTTP or whatever specific
protocol it wants to the remote host.

A few concerns: I don't know if Uxn programs can read environment
variables. Maybe some emulator supports it, but I'm not sure of any.

Their support for stdio also seems a bit barebones. You can read stdin,
write to stdout, but I don't know how that relates to "reading on
descriptor 6" and "writing on descriptor 7" as explained in the
documentation for s6-tlsclient.

Support for files seems much more robust, so in theory it could maybe work
over FIFOs? I would have a program read the input FIFO and write that to
descriptor 7, and read from descriptor 6 and write to the output FIFO. Then
the Uxn program just treats those like regular files. But I would need to
write a script to do the redirection probably.

There's also the dependency on s6-networking and therefore s6 itself I'd
like to avoid, for portability reasons. I want to be able to take the same
basic concept and adapt it to a Windows environment also, so that a Uxn
program running on an emulator for Windows can do the same type of thing.
But I don't think anyone's made a UCSPI tool for Windows.

TL;DR I want to add networking to a fantasy computer without changing the
emulator itself, by reusing it's support for console and file I/O. But I'm
not sure how to approach this.

Reply via email to