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)
| 318 | // Note that it copies f payload to prevent collisions. |
| 319 | // For less allocations you could use MaskFrameInPlace or construct frame manually. |
| 320 | func 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. |
searching dependent graphs…