google / quiche

BSD 3-Clause "New" or "Revised" License
616 stars 130 forks source link

How to access the spdsession object from a WebTransportSession #44

Open martenrichter opened 1 year ago

martenrichter commented 1 year ago

I would like to support getStats and sending goaway stuff in the node webtransport addon. However, I am hitting the following problem. GetStats and as well as sendGoawayHttps3 (needed at least from the server side) are available through the underlying QuicSpdySession. However, it is a private member of WebTransportHttp3, so I have no way to access it from a visitor. (My plan is to do a dynamic cast on the WebTransport object....).

Are there any plans to make these features available through the WebTransport base class, or at least to get access to the SpdySession? (I think deriving a class from WebTransportHttp3 is not an option, since it is created deep within quiche objects?) Or any hints, on how to do it in another way? Thanks?

vasilvv commented 1 year ago

I don't think there's a public accessor that would let you do this currently. Are you trying to implement the W3C APIs for stats and goaway? If so, I will be adding them at some point soon anyways, since we need those in Chrome.

martenrichter commented 1 year ago

Are you trying to implement the W3C APIs for stats and goaway? Yes, this is the intention. Goaway draining is already implemented, thanks to your commit last week, but missing a server equivalent, so not really working or tested without the ability to send it. Then I will wait....