anchor.diff:  			%% We may need to send an alarm for each of the streams sending data.
   			lists:foldl(
   				fun({StreamID, _, _}, S) -> maybe_send_data_alarm(S, HTTP2Machine0, StreamID) end,
  -				send_data(maybe_ack(State#state{http2_machine=HTTP2Machine}, Frame), SendData),
  +				send_data(maybe_ack(State#state{http2_machine=HTTP2Machine}, Frame), SendData, []),
   				SendData);
   		{error, {stream_error, StreamID, Reason, Human}, HTTP2Machine} ->
   			reset_stream(State#state{http2_machine=HTTP2Machine},
  
positive.code: 			end
  	end.
  
  send_data(State, []) ->
  	State;
  send_data(State0, [{StreamID, IsFin, SendData}|Tail]) ->
  	State = send_data(State0, StreamID, IsFin, SendData),
  	send_data(State, Tail).
  
  send_data(State0, StreamID, IsFin, [Data]) ->
  	State = send_data_frame(State0, StreamID, IsFin, Data),
  	maybe_terminate_stream(State, StreamID, IsFin);
  send_data(State0, StreamID, IsFin, [Data|Tail]) ->
  	State = send_data_frame(State0, StreamID, nofin, Data),
  	send_data(State, StreamID, IsFin, Tail).
  
  send_data_frame(State=#state{socket=Socket, transport=Transport},
  		StreamID, IsFin, {data, Data}) ->
  	Transport:send(Socket, cow_http2:data(StreamID, IsFin, Data)),
  	State;
  send_data_frame(State=#state{socket=Socket, transport=Transport, opts=Opts},
  		StreamID, IsFin, {sendfile, Offset, Bytes, Path}) ->
  	Transport:send(Socket, cow_http2:data_header(StreamID, IsFin, Bytes)),
  	%% When sendfile is disabled we explicitly use the fallback.
  	_ = case maps:get(sendfile, Opts, true) of
  		true -> Transport:sendfile(Socket, Path, Offset, Bytes);
  		false -> ranch_transport:sendfile(Transport, Socket, Path, Offset, Bytes, [])
  	end,
  	State;
  %% The stream is terminated in cow_http2_machine:prepare_trailers.
  send_data_frame(State=#state{socket=Socket, transport=Transport,
  		http2_machine=HTTP2Machine0}, StreamID, nofin, {trailers, Trailers}) ->
  	{ok, HeaderBlock, HTTP2Machine}
  		= cow_http2_machine:prepare_trailers(StreamID, HTTP2Machine0, Trailers),
  	Transport:send(Socket, cow_http2:headers(StreamID, fin, HeaderBlock)),
  	State#state{http2_machine=HTTP2Machine}.
  
  %% After we have sent or queued data we may need to set or clear an alarm.
  %% We do this by comparing the HTTP2Machine buffer state before/after for
  
negative.code: 	commands(State, StreamID, Tail);
  %% Send a response body chunk.
  commands(State0, StreamID, [{data, IsFin, Data}|Tail]) ->
  	State = maybe_send_data(State0, StreamID, IsFin, Data, []),
  	commands(State, StreamID, Tail);
  %% Send trailers.
  commands(State0, StreamID, [{trailers, Trailers}|Tail]) ->
  	State = maybe_send_data(State0, StreamID, fin, {trailers, maps:to_list(Trailers)}, []),
  	commands(State, StreamID, Tail);
  %% Send a push promise.
  %%
  