// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! FTP, both ends of it: RFC 959 and the extensions that made it usable — //! RFC 2228's security framework, RFC 2389's `FEAT`, RFC 2428's IPv6-capable //! data connections, RFC 3659's machine-readable listings and restartable //! transfers, RFC 2640's UTF-8 pathnames. //! //! Three layers, and you can stop at any of them: //! //! * `protocol` is the wire and nothing else. Pure functions over bytes, no //! I/O, no allocation you did not ask for. Use it to build something this //! library did not think of, or to read a transcript after the fact. //! * `Client` opens a control connection and drives a session over it. //! * `server` accepts them, and serves whatever a `Filesystem` says it has. //! //! Nothing here implements TLS. `Client` and `Session` both hold the control //! connection as an `Io.Reader` and an `Io.Writer` rather than as a socket, so //! a TLS layer can be put between them and the network without either of them //! changing, and `Features.auth_tls` reports whether a server offered one. //! Until something does that, treat a password sent over this as public. const std = @import("std"); pub const protocol = @import("protocol.zig"); pub const Client = @import("Client.zig"); pub const server = @import("server.zig"); /// A socket reader that gives up on a silent peer. `Client` and `server` use /// it for their timeouts; a program driving `server.Session` over a socket of /// its own can use it for the same. pub const TimeoutReader = @import("TimeoutReader.zig"); /// Its other half, for a peer that has stopped reading. pub const TimeoutWriter = @import("TimeoutWriter.zig"); /// The port IANA assigns to the FTP control connection. pub const default_port = 21; /// The port an active-mode data connection comes from, being the control /// port less one — which is where the convention that a passive port must be /// above 1023 comes from. pub const default_data_port = 20; test { std.testing.refAllDecls(@This()); }