Amiga-Z Wiki

โ€œModern tools for old-school communities.โ€

User Tools

Site Tools


projects:anetbbs:architecture

ANet BBS โ€” Architecture

ANet follows a modular, event-driven architecture built on Pythonโ€™s asyncio framework.


High-Level Design

  • One asyncio event loop
  • One coroutine per connected user (node)
  • No threads
  • Non-blocking I/O everywhere

Core Components

Component Description
server/telnet.py TCP listener + Telnet IAC handling
server/session.py Per-user state machine
server/terminal.py MCI โ†’ ANSI rendering engine
server/database.py SQLite access layer
sysop/main.py PyQt6 SysOp Control Panel

Session Model

Each user connection creates a BBSSession coroutine:

  • CONNECT
  • LOGIN (handle/password)
  • MAIN MENU
  • COMMAND LOOP
  • LOGOFF

State transitions are explicit and readable.


Text Rendering

ANet supports CNet-style MCI escape codes using `\x19` as a control prefix.

Examples:

  • `\x19n1` โ†’ New line
  • `\x19c6` โ†’ ANSI cyan
  • `\x19hc` โ†’ Clear screen

This allows reuse of original `bbstext.txt` files.


projects/anetbbs/architecture.txt ยท Last modified: by freedomotter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki