Repository navigation
modemmenu -serve: many callers at once, through to a BBS socket, tested - #14
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sydney · project thread
This branch is built on top of #13 (PPP pool), which was merged first.
How it works
modemmenu -serveaccepts each connection in its own goroutine, up tomax_sessions. Each caller gets a new pty with its own modemmenu process on it. When the caller picks amode = unixitem (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 pastmax_sessionshears "All lines are busy", and a line that hangs up is free again.docs/running.mdexplains the hops.Testing
go test -race ./...andgo test ./...pass.Generated by Claude Code