Hi,

Looking at previous Servlet 4.0 EG e-mails [1] and the PushBuilder.push()
API [2], it seems the current version returns true if the PUSH_PROMISE
frame + headers were sent, meaning the client can still reset that stream
and refuse to receive the response that goes with it.

Now looking at former EG e-mails, it seems that a previous version of the
spec stated that push "returns immediately without blocking" [3]. But this
API, and the implementation as far as I understand things [4], seems
synchronous. Or does that writing does not happen directly on the actual
socket but is later dispatched on another thread?

In general, I'm trying to understand how I can use that API in an async,
non-blocking way and if the application really needs to know if the Push
promise "happened" or not...

Cheers,

[1] https://java.net/projects/servlet-spec/lists/jsr369-
experts/archive/2016-03/message/0
[2] https://github.com/apache/tomcat/blob/trunk/java/javax/s
ervlet/http/PushBuilder.java#L161-L178
[3] https://java.net/projects/servlet-spec/lists/jsr369-expe
rts/archive/2015-12/message/8
[4] https://github.com/apache/tomcat/blob/trunk/java/org/apa
che/coyote/http2/Http2UpgradeHandler.java#L1036
--
Brian Clozel

Reply via email to