anchor.diff:  	Data2 = << Buffer/binary, Data/binary >>,
   	IsFin2 = if IsFin -> fin; true -> nofin end,
   	Child2 = case IsRecv of
  -		{true, FromSocket, FromPid, 0} ->
  +		{true, FromSocket, FromPid, 0, TRef} ->
   			FromPid ! {recv, FromSocket, {ok, Data2}},
  +			cancel_recv_timeout(StreamID, TRef),
   			Child#child{input=IsFin2, in_buffer= <<>>, is_recv=false};
  -		{true, FromSocket, FromPid, Length} when byte_size(Data2) >= Length ->
  +		{true, FromSocket, FromPid, Length, TRef}
  +				when byte_size(Data2) >= Length ->
   			<< Data3:Length/binary, Rest/binary >> = Data2,
   			FromPid ! {recv, FromSocket, {ok, Data3}},
  +			cancel_recv_timeout(StreamID, TRef),
   			Child#child{input=IsFin2, in_buffer=Rest, is_recv=false};
   		_ ->
   			Child#child{input=IsFin2, in_buffer=Data2}
  
positive.code: 	input = nofin :: fin | nofin,
  	in_buffer = <<>> :: binary(),
  	is_recv = false :: {true, {non_neg_integer(), pid()},
  		pid(), non_neg_integer()} | false,
  	output = nofin :: fin | nofin
  }).
  
  
negative.code: handle_frame(State, Frame) ->
  	error_logger:error_msg("Ignored frame ~p", [Frame]),
  	loop(State).
  
  cancel_recv_timeout(StreamID, TRef) ->
  	_ = erlang:cancel_timer(TRef),
  	receive
  		{recv_timeout, {Pid, StreamID}}
  				when Pid =:= self() ->
  			ok
  	after 0 ->
  		ok
  	end.
  
  %% @todo We must wait for the children to finish here,
  %% but only up to N milliseconds. Then we shutdown.
  