AntOS Library — xfer (reference)
The
xferlibrary'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
gossipmesh, and period-authentic BBS sessions alike. New transports become newxfer.<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
- luau_xfer — the script API · antos_net · gossip · antos_telnet · AntOS Libraries hub