anchor.diff:  		_ ->
   			<< Data2:Len/binary, Rest/bits >> = Data,
   			{Data2, Rest, true}
  +	end.
  +
  +validate_close_code(Code) ->
  +	if
  +		Code < 1000 -> error;
  +		Code =:= 1004 -> error;
  +		Code =:= 1005 -> error;
  +		Code =:= 1006 -> error;
  +		Code > 1011, Code < 3000 -> error;
  +		Code > 4999 -> error;
  +		true -> ok
   	end.
   
   unmask(Data, MaskKey, 0) ->
  
positive.code: validate_utf8(_) ->
  	false.
  
  %% @doc Construct an unmasked Websocket frame.
  
  -spec frame(frame(), extensions()) -> iodata().
  %% Control frames. Control packets must not be > 125 in length.
  
negative.code: %% that defines meanings for non-zero values.
  parse_header(<< _:1, Rsv:3, _/bits >>, Extensions, _) when Extensions =:= #{}, Rsv =/= 0 -> error;
  %% Last 2 RSV bits MUST be 0 if deflate-frame extension is used.
  parse_header(<< _:2, 1:1, _/bits >>, #{deflate := _}, _) -> error;
  parse_header(<< _:3, 1:1, _/bits >>, #{deflate := _}, _) -> error;
  %% Invalid opcode. Note that these opcodes may be used by extensions.
  parse_header(<< _:4, 3:4, _/bits >>, _, _) -> error;
  parse_header(<< _:4, 4:4, _/bits >>, _, _) -> error;
  