Skip to main content

Crate badterm_core

Crate badterm_core 

Source
Expand description

Front-end independent core of the BadTerm BBS client: CP437 handling, ANSI-BBS terminal emulation, the telnet protocol, the dialing directory and connection sessions (telnet, raw TCP and SSH) with ZMODEM file transfers.

Re-exports§

pub use ansi::Encoding;
pub use ansi::TermEvent;
pub use ansi::Terminal;
pub use dialer::Directory;
pub use dialer::Entry;
pub use dialer::Protocol;
pub use screen::Cell;
pub use screen::Color;
pub use screen::Screen;
pub use session::AuthPrompt;
pub use session::NetEvent;
pub use session::PromptKind;
pub use session::Session;
pub use session::SessionConfig;
pub use session::SessionEvent;

Modules§

ansi
ANSI-BBS / ANSI X3.64 terminal emulation.
atascii
Atari 8-bit BBSes: ATASCII, on the 40x24 screen of the Atari’s text mode, light text on blue.
autologin
Logging in with the entry’s stored user name and password: answering the BBS’s prompts by itself, or one step at a time on the user’s request (Alt-L).
cp437
IBM code page 437 <-> Unicode conversion.
dialer
The dialing directory: saved BBS entries, stored as TOML, with import and export in SyncTERM .lst, CSV, JSON and TOML formats.
export
Turning screen contents back into files or clipboard text: plain text, and ANSI as BBS art viewers and editors expect it (CP437 bytes for .ans files, or Unicode for pasting).
music
ANSI music: the BASIC PLAY language that BBSes send between ESC [ M (or ESC [ N, ESC [ |) and Ctrl-N, turned into tones to play.
palette
Color definitions: the 16-color CGA/VGA palette plus the xterm 256-color extension and 24-bit RGB used by modern BBS software.
petscii
Commodore 64 BBSes: PETSCII, on a 40x25 screen in the C64’s colors.
sauce
SAUCE, the record at the end of most ANSI art: title, artist, group, date, the width it was drawn at, its font and whether it uses iCE colors, plus any comment lines (https://www.acid.org/info/sauce/sauce.htm).
screen
The character-cell screen model: a grid of CP437 glyphs with attributes, a cursor, a scrolling region and a scrollback buffer.
session
A live connection to a BBS: protocol decoding, terminal state, ZMODEM transfers and session capture. Networking lives in crate::transport.
telnet
Telnet protocol (RFC 854) with the option negotiation a BBS client needs: BINARY (RFC 856), ECHO (857), SGA (858), TERMINAL-TYPE (1091) and NAWS (1073).
tls
Telnet over TLS (“TelnetS”, usually port 992), on rustls with the same ring crypto as SSH.
transfer
File transfers: ZMODEM here, and XMODEM and YMODEM in crate::xmodem.
transport
Network transports. Each connection runs on its own background thread and reports NetEvents through a callback; the caller writes through the Writer handed over in NetEvent::Connected.
update
Checking for a newer BadTerm: one HTTPS request for the newest release on the project’s Forgejo, made only when the user has turned the check on. It sends nothing but the request itself (with a “BadTerm/x.y.z” user agent).
xmodem
XMODEM (checksum, CRC and 1K) and YMODEM (batch, and the streaming YMODEM-G) file transfers, for the BBSes and doors that offer them.