ax(node): replace Send comment that restated the signature with a usage example
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 2: comments show HOW with real values, not WHAT the type
signature already says. "Send sends an encrypted message over the
connection." adds zero information.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 08:27:26 +01:00
parent 6704ac781c
commit 115672cdfd
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -818,7 +818,7 @@ func (t *Transport) removeConnection(pc *PeerConnection) {
pc.Close()
}
// Send sends an encrypted message over the connection.
// if err := conn.Send(msg); err != nil { logging.Error("send failed", ...) }
func (pc *PeerConnection) Send(msg *Message) error {
pc.writeMu.Lock()
defer pc.writeMu.Unlock()