code: func NewWriterBufferSize(dest io.Writer, state ws.State, op ws.OpCode, n int) *Writer {
  	if n <= ws.MinHeaderSize {
  		n = DefaultWriteBuffer
  	}
  	return NewWriterBuffer(dest, state, op, make([]byte, n))
  }
docs: // NewWriterBufferSize returns a new Writer whose buffer size is equal to n.
  // If n <= ws.MinHeaderSize then the default buffer size is used.
  //
  // Note that Writer will reserve x bytes for header data, where x is in range
  // [ws.MinHeaderSize,ws.MaxHeaderSize]. That is, frames flushed by Writer
  // will not have payload length equal to n, except the case when Write() is
  // called on empty Writer with len(p) > n.