https://gitlab.synchro.net/main/sbbs/-/commit/29e975fd78bd69abe0e0492b
Modified Files:
docs/v322_new.md src/vdmodem/readme.txt vdmodem.c
Log Message:
vdmodem: hunt group, one listening TCP port shared by several nodes (#1175)
Each SVDM process still serves one DOS node, but with Hunt=true in the root section of svdm.ini every node can listen on the same TCP port. The process that binds the port owns it: it accepts each connection, applies the IP
filter, takes the call if idle, and otherwise offers the socket to the other nodes over per-node named pipes (\.\pipe\svdm-hunt-<port>-<node>), lowest
node number first. The first idle node claims the offer, the owner
duplicates the socket into that process with WSADuplicateSocket() and
closes its own copy once the member acknowledges, and the member rings as
if it had accepted the connection itself. When no node is free the caller
gets the BusyNotice as before. A process that finds the port in use joins
the group instead of exiting, and members retry the bind every 5 seconds so
the port survives the owner exiting. Windows allows that bind while the departed owner's handed-off connections are still established, so no SO_REUSEADDR is needed.
In hunt mode an off-hook or already-ringing owner also counts as busy, so
such calls are handed on rather than parked on a node that will never
ring. Non-hunt behavior is unchanged: a second process on the port still
fails to bind, and the off-hook case is untouched.
answer() and the S0= handler now test the Listen setting rather than the listening socket, since a member has no listening socket but must be able
to auto-answer. WSAStartup requests Winsock 2.2 for WSADuplicateSocket().
Hunt is ignored, with a warning, together with -h. All nodes of a group
must run as the same user at the same elevation: a node whose pipe can't
be opened, or that can't receive the duplicated socket, is logged and
skipped.
Bump SVDM to v0.8; document multi-node use and the Hunt key in readme.txt.
Co-Authored-By: Claude Fable 5.1 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net