AntOS Library — xfer (reference)

The xfer library's design and native core — file transfer over any byte-stream. The script-facing API is luau_xfer.

What it is

The classic X/Y/Zmodem transfer protocols, decoupled from the transport. A connection object wraps some stream — a TCP socket, a gossip peer, a Telnet-wrapped BBS link — and send/recv/detect/cancel run the protocol over it.

Design notes

  • Protocol ⟂ pipe. The transfer logic doesn't know or care what carries the bytes, so one implementation serves modern TCP, the gossip mesh, and period-authentic BBS sessions alike. New transports become new xfer.<kind>(…) constructors, not new protocol code.
  • Telnet IAC stripping is a wrapper (xfer.telnet) because BBS-over-Telnet needs the IAC escapes removed from the data stream — a transport concern kept out of the protocol core.

Native core — libantos_xfer

sys_xfer implements the X/Y/Zmodem state machines against an abstract stream interface; the binding provides the connection constructors and marshals transfer calls/results. No Luau dependency.

Related

Important: The Ant64 family of home computers are at early design/prototype stage, everything you see here is subject to change.