Ken Johnson efed2f9665 daemon: write-aware driver loops + fast banner peek
Three perf fixes for the daemon-side protocol drivers:

1. cometbinkpfpc + cometfpc: pass Session.HasPendingTx as the
   WantWrite argument to Transport.WaitReady so select() also
   wakes on socket-write readiness when there are queued
   outbound bytes.  Without this, large outbound transfers
   paid a 50 ms idle-wait per frame (binkd-style poll cadence
   instead of Argus's CanSend socket-buffer pacing).

   Live measurement, 10 MB BinkP outbound to a Comet 1.2.2
   BinkP-fallback responder, both ends running this fix:
     bbsnode2 (FreeBSD/LAN):  134 s -> 2.7 s  (~50x)
     sea-vps11 (Linux/WAN):   134 s -> 1.7 s  (~80x)

   Requires fpc-binkp v0.4.0 + fpc-comet v0.4.0 (HasPendingTx
   accessor, additive).

2. cometdaemon: cap the inbound banner protocol-detect peek
   at 100 ms instead of TimeoutHandshake * 1000 (= 30 s).

   The 3d1d9f7 "sniff-first" change inverted the banner flow
   from send-then-recv to wait-peek-conditional-send-recv to
   avoid sending COMET/1.0 to BinkP-only peers (Argus, binkd)
   that misparse it as a junk M_NUL frame header.  But the
   30 s outer timeout combined with the new read-then-write
   order interacted badly with TCP_NODELAY not being set
   until CometSessionInit ran further down -- the server's
   banner became the first socket write after accept(), got
   held by Nagle / ack-delay, and the same pattern repeated
   for every small write through INIT/INITACK.  Net cost was
   ~5 s per Comet session.

   100 ms is enough headroom for any client to send its
   first byte (Comet clients send banner immediately on
   connect, BinkP clients send a frame).  If no data within
   100 ms we fall through to the original send-then-recv
   path; CometRecvBanner still detects BinkP from the first
   byte (cometses.pas:298) as a safety net.

   Live measurement, 10 MB Comet outbound:
     before: 7.31 s
     after:  3.4 s  (2.1x)

   Argus / binkd interop preserved -- BinkP frames still
   detected at the peek; banner only sent when peek shows
   Comet bytes or no data within 100 ms.

   No fpc-comet change.  No wire-protocol change.

Bisect history + bench matrix in
~/.COMET_TESTING_SESSION.md "Resolution -- 2026-04-25 §4".
2026-04-25 10:35:27 -07:00
2026-04-09 09:22:48 -07:00

Comet Mailer

A modern FidoNet TCP mailer daemon for the 2020s.

Comet provides direct TCP file transfer with a purpose-built protocol while maintaining full BinkP/1.1 (FTS-1026) compatibility. Both protocols are auto-detected on the same port.

Features

  • Direct TCP file transfer with SHA-256 verification
  • Bidirectional transfer with sliding window flow control
  • ED25519 public-key authentication (no shared secrets needed)
  • CRAM-MD5 password authentication (passwords never sent in clear)
  • X25519 + ChaCha20 encryption (when using ED25519 auth)
  • Full BinkP/1.1 compatibility (FTS-1026) with auto-detection
  • Inline file requests (Hydra-style, within active sessions)
  • FTS-5 nodelist integration (automatic IP/port lookup)
  • BSO outbound scanning with point directory support
  • Optional zlib compression (per-block, automatic)
  • Multi-session daemon with per-node BSY locking
  • Config hot-reload (edit config while Comet is running)
  • Embeddable in BBS software via log/event callbacks and stream API
  • Cross-platform: Linux, FreeBSD, DOS, Windows, OS/2

Quick Start

comet keygen                    # generate ED25519 keypair
comet showkey                   # print public key from config
comet                           # run as daemon (listen + poll)
comet call 1:213/723            # single outbound call
comet -c /path/to/comet.cfg     # use alternate config file
comet -d call 1:213/723         # debug/trace mode

See COMET.SAM for an annotated sample configuration.

Platforms

Platform Status Notes
Linux x86-64 Production Primary platform
FreeBSD x86-64 Production Cross-compiled from Linux
DOS (FreeDOS) Production Requires CWSDPMI + Watt-32 packet driver
Windows 64-bit In progress WinSock2, needs type compatibility fixes
OS/2 Experimental FPC OS/2 Sockets unit, untested

Building

Requires Free Pascal Compiler (FPC) 3.2.x.

make              # Linux (default)
make freebsd      # FreeBSD cross-compile
make dos          # DOS cross-compile
make win64        # Windows 64-bit cross-compile

Documentation

  • COMET.DOC — Full operator manual
  • COMET.SAM — Annotated sample configuration
  • FSP-COMET.001 — Wire protocol specification

Tested Against

  • binkd (reference BinkP implementation)
  • Radius/Argus 4.010 (CRAM-MD5 + CRYPT)
  • BinkIT/sbbs 2.42 (CRAM-MD5)

Contact

License

GPL-2.0

Description
Bringing Fidonet Protocols into the 21st century
Readme 8.6 MiB
Comet 1.2-1 Latest
2026-04-09 16:30:01 +00:00
Languages
JavaScript 57.2%
Pascal 39.8%
Shell 1.3%
CSS 0.8%
HTML 0.7%
Other 0.2%