Package-level declarations
Types
The session-wide connection cap, the enforcement half of libtorrent's connections_limit setting (session_impl::m_settings, default 200).
The top-level engine, the KiteTorrent equivalent of libtorrent's session. It owns the shared NetworkRuntime, the RateLimiter, the ConnectionBudget, an optional DhtNode and UtpSocketManager, and the set of active TorrentSessions. This is the single object an app talks to.
Session-wide upload/download rate limiting: the live driver for the pure BandwidthManager/BandwidthChannel port.
The pure "stop seeding?" decision. This is the port of libtorrent's share-ratio and seed-time limit checks (session_impl::recalculate_auto_managed_torrents, torrent::seed_ratio / is_seed_limit_reached). Kept side-effect-free so the policy is exhaustively unit-testable; io.github.yuroyami.kitetorrent.session.engine.TorrentSession consults it on its maintenance tick and pauses when it returns true.
A torrent's upload/download token-bucket pair, layered under the session-global channels the way libtorrent stacks bandwidth_channels (global → torrent) in a peer's request. Limits of 0 = unlimited.
The download/upload engine for a single torrent. It is the live counterpart of libtorrent's torrent (torrent.cpp). It wires the pure-core pieces on coroutines: announce → collect peers → run a PeerConnection per peer → a PiecePicker-driven request pipeline → write blocks to DiskIo → verify completed pieces → broadcast have → and serve blocks back to peers we've unchoked.
The lifecycle state of a torrent. A small port of libtorrent's torrent_status::state_t.