anchor.diff:  			handler_terminate(State, Req, HandlerState, {error, Reason});
   		Message ->
   			handler_call(State, Req, HandlerState,
  -				SoFar, Message, fun handler_loop/4)
  +				SoFar, Message, fun handler_before_loop/4)
   	after Timeout ->
   		websocket_close(State, Req, HandlerState, {normal, timeout})
   	end.
  
positive.code: 	<< "ws://", Host/binary, ":",
  		(list_to_binary(integer_to_list(Port)))/binary, Path/binary >>.
  
  -spec handler_loop(#state{}, #http_req{}, any(), binary()) -> ok.
  handler_loop(State=#state{messages={OK, Closed, Error}, timeout=Timeout},
  		Req=#http_req{socket=Socket, transport=Transport},
  		HandlerState, SoFar) ->
  	Transport:setopts(Socket, [{active, once}]),
  	receive
  		{OK, Socket, Data} ->
  			websocket_data(State, Req, HandlerState,
  
negative.code: 	try Handler:websocket_handle(Message, Req, HandlerState) of
  		{ok, Req2, HandlerState2} ->
  			NextState(State, Req2, HandlerState2, RemainingData);
  		{ok, Req2, HandlerState2, hibernate} ->
  			NextState(State#state{hibernate=true},
  				Req2, HandlerState2, RemainingData);
  		{reply, Data, Req2, HandlerState2} ->
  			websocket_send(Data, Req2),
  			NextState(State, Req2, HandlerState2, RemainingData);
  		{reply, Data, Req2, HandlerState2, hibernate} ->
  			websocket_send(Data, Req2),
  			NextState(State#state{hibernate=true},
  				Req2, HandlerState2, RemainingData);
  		{shutdown, Req2, HandlerState2} ->
  			websocket_close(State, Req2, HandlerState2, {normal, shutdown})
  	catch Class:Reason ->
  