MCPcopy
hub / github.com/nats-io/nats.go / wsMaskBuf

Function wsMaskBuf

ws.go:548–552  ·  view source on GitHub ↗
(key, buf []byte)

Source from the content-addressed store, hash-verified

546}
547
548func wsMaskBuf(key, buf []byte) {
549 for i := 0; i < len(buf); i++ {
550 buf[i] ^= key[i&3]
551 }
552}
553
554// Create the frame header.
555// Encodes the frame type and optional compression flag, and the size of the payload.

Callers 3

WriteMethod · 0.85
wsEnqueueControlMsgMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected