[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CAB and MiNTNet

If anyone's interested, I've been tinkering with the MiNTnet overlay for
CAB that Andrew Vesperman originally wrote. I emailed him about the code
but hadn't heard anything back, so I'm making this announcement here...

I started from the 1.64 source that was on atari.archive. I modified it
to use the proxy variables that CAB passes in, instead of relying on
environment variables. I also added support for POST/forms, which was a no-op
in that revision. I also rewrote things to run in a separate process
(spawned using tfork), which allows a bit of multi-threaded operation.
(I was constantly aggravated by the long delays contacting some hosts,
and not being able to use the STOP button to break out...)

The approach is awkward, but it's the only one that works given the braindead
state of MultiTOS/AES. The problem is that the AES evnt_multi call can't
wait for a file descriptor as an event, and the select system call can't be
used to select for AES events, so it is impossible for a single process to
efficiently wait for both occurrences. I tfork the child process to do all
of the actual network & file I/O, while the parent sits in the evnt_multi
call. When the browser issues a request, the parent process writes a command
byte down a pipe. The child reads the pipe and performs the request. Meanwhile
the parent goes and sits in an evnt_multi, waiting for something to happen.
If the child completes the request, it notifies the parent via AES message.
If the parent wants to abort, it signals the child.

At present it seems to work well enough. I plan to add native support for
FTP at some point, although I currently get all my services through a proxy.

Oh - I'm running with memory protection disabled. The parent and child are
sharing address space, and I prefer to leave it that way...

Howard Chu				Principal Member of Technical Staff
hyc@locus.com				PLATINUM technology, Los Angeles Lab