MCPcopy
hub / github.com/gobwas/ws / MaskFrame

Function MaskFrame

frame.go:320–322  ·  view source on GitHub ↗

MaskFrame masks frame and returns frame with masked payload and Mask header's field set. Note that it copies f payload to prevent collisions. For less allocations you could use MaskFrameInPlace or construct frame manually.

(f Frame)

Source from the content-addressed store, hash-verified

318// Note that it copies f payload to prevent collisions.
319// For less allocations you could use MaskFrameInPlace or construct frame manually.
320func MaskFrame(f Frame) Frame {
321 return MaskFrameWith(f, NewMask())
322}
323
324// MaskFrameWith masks frame with given mask and returns frame
325// with masked payload and Mask header's field set.

Callers 3

TestNextReaderFunction · 0.92
TestWriterFunction · 0.92
TestControlHandlerFunction · 0.92

Calls 2

MaskFrameWithFunction · 0.85
NewMaskFunction · 0.85

Tested by 3

TestNextReaderFunction · 0.74
TestWriterFunction · 0.74
TestControlHandlerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…