control-channel: CLAUDE.md re-read — citation and doc-comment fixes
Item 4 of the rework brief: re-read the four MWBNet files against CLAUDE.md. Sizes (189/234/356/524), function lengths, layering, the one-sentence responsibility test, no force-unwrap/try!/fatalError/ precondition, no logging of any kind and no packet interpretation all hold; `swift-format format -i` is a no-op on all four. Three citations were off and are corrected against the source: - `Common.SendByeBye` is Common.cs:611-615, not 612-616 (ControlChannel, PeerConnection). - `SkSend`'s stamp-and-fan-out is Common.cs:916-930, and the `Des == ID.ALL` matrix test is :922-930, not :912-930 / :919-929. `DisconnectReason.idCollision` and `channelDetectedIDCollision` now say in their doc comments what the previous commit made true in the code: the collision is looked for on outbound connections only (SocketStuff.cs:1980-1992). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
1 parent
a892af6ca3
commit
c4ac584df0
3 files changed
+10
-8
No files matched your search
@@ -116,7 +116,7 @@ public final class ControlChannel: @unchecked Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
/// Queues `ByeBye` on every trusted connection (`Common.cs:612-616`). Call
|
||||
/// Queues `ByeBye` on every trusted connection (`Common.cs:611-615`). Call
|
||||
/// it before `stop()` on a clean exit.
|
||||
public func sayGoodbye() {
|
||||
queue.async { [self] in
|
||||
@@ -173,7 +173,7 @@ public final class ControlChannel: @unchecked Sendable {
|
||||
/// `.all` goes to every trusted connection whose peer is in the matrix, and
|
||||
/// `.peer` to both of a peer's connections when it has two — the same
|
||||
/// bytes, the same `Id`, exactly as `SkSend` fans one packet out over many
|
||||
/// sockets (`Common.cs:912-930`).
|
||||
/// sockets (`Common.cs:916-930`).
|
||||
public func forward(_ packet: Packet, to destination: Destination) {
|
||||
queue.async { [self] in
|
||||
let now = monotonicNow()
|
||||
|
||||
Reference in new issue
Block a user