lib/async/http/protocol/http2/stream.rb in async-http-0.44.0 vs lib/async/http/protocol/http2/stream.rb in async-http-0.45.0
- old
+ new
@@ -37,17 +37,21 @@
end
attr_accessor :delegate
attr :body
- def create_promise_stream(headers, stream_id)
- @delegate.create_promise_stream(headers, stream_id)
+ def create_push_promise_stream(headers)
+ @delegate.create_push_promise_stream(headers)
end
- def close(state = :closed)
+ def accept_push_promise_stream(headers, stream_id)
+ @delegate.accept_push_promise_stream(headers, stream_id)
+ end
+
+ def close!
super
- @delegate.close
+ @delegate.close!
end
def send_body(body, task: Async::Task.current)
# TODO Might need to stop this task when body is cancelled.
@task = task.async do |subtask|