Skip to content

modemmenu -serve: many callers at once, through to a BBS socket, tested - #14

Merged
Neo-Desktop merged 1 commit into
mainfrom
claude/project-thread-o07i2c
Nov 8, 2026
Merged

Neo-Desktop merged 1 commit into
mainfrom
claude/project-thread-o07i2c

Conversation

@Neo-Desktop

Copy link
Copy Markdown
Collaborator

Requested by Sydney · project thread

This branch is built on top of #13 (PPP pool), which was merged first.

How it works

modemmenu -serve accepts each connection in its own goroutine, up to max_sessions. Each caller gets a new pty with its own modemmenu process on it. When the caller picks a mode = unix item (for example the BBS), that session opens a new connection to the BBS socket for that caller alone and copies bytes between the pty and that connection. Nothing passes descriptors (SCM_RIGHTS); each hop copies.

What changes

No server code changed. This PR adds tests and docs:

  • TestServeManyCallers: eight callers at once on -serve's unix socket. Each sends its own header, logs in, and is handed to a fake BBS on a unix socket. It checks for eight BBS connections, all there at the same time, each with its own user, and that no caller sees another caller's bytes.
  • TestServeBusy: a caller past max_sessions hears "All lines are busy", and a line that hangs up is free again.
  • docs/running.md explains the hops.

Testing

  • go test -race ./... and go test ./... pass.
  • The new tests passed 3 runs in a row.

Generated by Claude Code

TestServeManyCallers: eight callers at once on -serve's unix socket,
each with its own header, login and menu, each handed to a BBS on a
unix socket by an item (mode = unix, header = yes): eight connections
to the BBS, all there together, each with its own user, and no caller
sees another's bytes.  TestServeBusy: past max_sessions a caller hears
the lines are busy, and a line that hangs up is free again.

running.md says how the hops work: a connection per caller at each
one, the bytes copied, no descriptor passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRxseyEuLRFbFaBoX3
@Neo-Desktop Neo-Desktop self-assigned this Nov 8, 2026
@Neo-Desktop
Neo-Desktop merged commit b108d43 into main Nov 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants