anchor.diff:  
   -spec websocket_close(#state{}, cowboy_req:req(), any(), {atom(), atom()})
   	-> closed.
  -websocket_close(State=#state{version=0}, Req=#http_req{socket=Socket,
  -		transport=Transport}, HandlerState, Reason) ->
  +websocket_close(State=#state{socket=Socket, transport=Transport, version=0},
  +		Req, HandlerState, Reason) ->
   	Transport:send(Socket, << 255, 0 >>),
   	handler_terminate(State, Req, HandlerState, Reason);
   %% @todo Send a Payload? Using Reason is usually good but we're quite careless.
  -websocket_close(State, Req=#http_req{socket=Socket,
  -		transport=Transport}, HandlerState, Reason) ->
  +websocket_close(State=#state{socket=Socket, transport=Transport},
  +		Req, HandlerState, Reason) ->
   	Transport:send(Socket, << 1:1, 0:3, 8:4, 0:8 >>),
   	handler_terminate(State, Req, HandlerState, Reason).
   
  
positive.code: 		_PayloadLen, _Rest, _Data) ->
  		websocket_close(State, Req, HandlerState, {error, badframe}).
  
  
  %% hybi routing depending on whether unmasking is needed.
  -spec websocket_before_unmask(#state{}, cowboy_req:req(), any(), binary(),
  	binary(), opcode(), 0 | 1, non_neg_integer() | undefined) -> closed.
  
negative.code: 			NextState(State#state{hibernate=true},
  				Req2, HandlerState2, RemainingData);
  		{reply, Payload, Req2, HandlerState2} ->
  			websocket_send(Payload, State),
  			NextState(State, Req2, HandlerState2, RemainingData);
  		{reply, Payload, Req2, HandlerState2, hibernate} ->
  			websocket_send(Payload, State),
  			NextState(State#state{hibernate=true},
  				Req2, HandlerState2, RemainingData);
  		{shutdown, Req2, HandlerState2} ->
  