anchor.diff:   when ?is_transport(Prot), is_binary(Pckt) ->
      case ws_recv(Pckt, Pipe, State#fsm.stream) of
         {eof, Stream} ->
  -         pipe:b(Pipe, {ws, self(), {terminated, normal}}),
  +         pipe:b(Pipe, {ws, self(), eof}),
            {stop, normal, State#fsm{stream=Stream}};
         {_,   Stream} ->
            {next_state, 'ESTABLISHED', State#fsm{stream=Stream}}
  
positive.code:       end
     catch _:Reason ->
        ?NOTICE("knet [ws]: failure ~p ~p", [Reason, erlang:get_stacktrace()]),
        pipe:b(Pipe, {ws, self(), {terminated, Reason}}),
        {stop, Reason, State}
     end;
  
  
negative.code:    try
        case htstream:decode(Pckt, Stream#stream.recv) of
           {{101, Msg, Head}, Http} ->
              <<"Upgrade">>   = lens:get(lens:pair(<<"Connection">>), Head),
              <<"websocket">> = lens:get(lens:pair(<<"Upgrade">>), Head),
              pipe:b(Pipe, {ws, self(), {101, Msg, Head}}),
              'ESTABLISHED'({Prot, Sock, htstream:buffer(Http)}, Pipe, 
                 State#fsm{stream = ws_new(server, Stream#stream.peer, [])});
           {[], Http} ->
  