anchor.diff:  %% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   
   -module(cowboy_http_websocket).
  --export([upgrade/3]).
  +-export([upgrade/3]). %% API.
  +-export([handler_loop/4]). %% Internal.
   
   -include("include/http.hrl").
   
  
positive.code: 	try Handler:websocket_handle(Message, Req, HandlerState) of
  		{ok, Req2, HandlerState2} ->
  			NextState(State, Req2, HandlerState2, RemainingData);
  		{reply, Data, Req2, HandlerState2} ->
  			websocket_send(Data, Req2),
  			NextState(State, Req2, HandlerState2, RemainingData);
  		{shutdown, Req2, HandlerState2} ->
  			websocket_close(State, Req2, HandlerState2, {normal, shutdown})
  	catch Class:Reason ->
  
negative.code: websocket_data(State, Req, HandlerState, << 255, 0, _Rest/bits >>) ->
  	websocket_close(State, Req, HandlerState, {normal, closed});
  websocket_data(State, Req, HandlerState, <<>>) ->
  	handler_before_loop(State, Req, HandlerState, <<>>);
  websocket_data(State, Req, HandlerState, Data) ->
  	websocket_frame(State, Req, HandlerState, Data, binary:first(Data)).
  
  