// Create the frame header.
// Encodes the frame type and optional compression flag, and the size of the payload.
Create the frame header.
Encodes the frame type and optional compression flag, and the size of the payload.
// Create the frame header . // Encodes the frame type and optional compression flag and the size of the payload .
func wsCreateFrameHeader(compressed bool, frameType wsOpCode, l int) ([]byte, []byte) {
	fh := make([]byte, wsMaxFrameHeaderSize)
	n, key := wsFillFrameHeader(fh, compressed, frameType, l)
	return fh[:n], key
}
func wsCreateFrameHeader ( compressed bool , frameType wsOpCode , l int ) ( [ ] byte , [ ] byte ) { fh := make ( [ ] byte , wsMaxFrameHeaderSize ) n , key := wsFillFrameHeader ( fh , compressed , frameType , l ) return fh [ : n ] , key }
Create the frame header.
Create the frame header .