code: func headerSize(s ws.State, n int) int {
  	return ws.HeaderSize(ws.Header{
  		Length: int64(n),
  		Masked: s.ClientSide(),
  	})
  }
docs: // headerSize returns number of bytes needed to encode header of a frame with
  // given state and length.