ax(node): replace Send comment that restated the signature with a usage example
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:
parent
6704ac781c
commit
115672cdfd
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue