anchor.diff:  -type frag_state() :: undefined
   	| {nofin, opcode(), binary()} | {fin, opcode(), binary()}.
   -type rsv() :: << _:3 >>.
  +-type terminate_reason() :: {normal | error | remote, atom()}
  +	| {remote, close_code(), binary()}.
   
   -record(state, {
   	env :: cowboy_middleware:env(),
  
positive.code: 		{Error, State2} -> {Error, State2}
  	end.
  
  -spec websocket_close(#state{}, Req, any(),
  	{atom(), atom()} | {remote, close_code(), binary()})
  	-> {ok, Req, cowboy_middleware:env()}
  	when Req::cowboy_req:req().
  websocket_close(State=#state{socket=Socket, transport=Transport},
  
negative.code: 	end,
  	handler_terminate(State, Req, HandlerState, Reason).
  
  -spec handler_terminate(#state{}, Req, any(), terminate_reason())
  	-> {ok, Req, cowboy_middleware:env()}
  	when Req::cowboy_req:req().
  handler_terminate(#state{env=Env, handler=Handler},
  