Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Reprioritization of Jetty

Hi

But I find chrome will send window_update frame. Here is a part of the packages when I made request to google.com

t=13293813 [st=    0]    HTTP2_STREAM_UPDATE_RECV_WINDOW
                         --> delta = 15663105
                         --> window_size = 15728640
t=13293813 [st=    0]    HTTP2_SESSION_SENT_WINDOW_UPDATE_FRAME
                         --> delta = 15663105
                         --> stream_id = 0
t=13294034 [st=  221]    HTTP2_SESSION_RECV_SETTINGS
                         --> clear_persisted = false
                         --> host = "www.google.com:443"
t=13294034 [st=  221]    HTTP2_SESSION_RECV_SETTING
                         --> flags = 0
                         --> id = 3
                         --> value = 100
t=13294034 [st=  221]    HTTP2_SESSION_UPDATE_STREAMS_SEND_WINDOW_SIZE
                         --> delta_window_size = 983041

You can see the client has send the window_update_frame. And when I set the key 4(initial ) as 100. I find all the frames I received is 100. I was wondering why the size of the frame I received is configured by the settings frame? It seems I can do flow control by using settings frame. I am confused why not using window_update frame, which is responsible for flow control.

Best Regards
Muhui Jiang

2015-09-27 23:46 GMT+08:00 Simone Bordet <sbordet@xxxxxxxxxxx>:
Hi,

On Sun, Sep 27, 2015 at 5:39 PM, Muhui Jiang <jiangmuhui@xxxxxxxxx> wrote:
> Hi
>
> Simone. Another thing I want to ask you(sorry for so many questions). I set
> the key 4 to 100 in the settings to enable the window size I got for every
> frame.
>
>         int key1 = 4;
>
>         Integer value1 = 100;
>
>         settings1.put(key1, value1);
>
>         SettingsFrame settingsFrame = new SettingsFrame(settings1, false);
>
>
> But I didn't send any window update frame. I was wondering whether Jetty did
> this in the background.
>
> And when I tried to send window_update frame to the server. I find Jetty
> only supports the method for Http2Session. Session doesn't have this
> function. But you know I use this
>
>
>         FuturePromise<Session> sessionPromise = new FuturePromise<>();
>
>         client.connect(sslContextFactory, new InetSocketAddress(host, port),
>
>         new ServerSessionListener.Adapter(), sessionPromise);
>
>         Session session = sessionPromise.get(5, TimeUnit.SECONDS);
>
>
> to open the session. I don't know how to send window_update_frame. Could you
> please give me a hint? Thank you so much.

Applications do not need to send WINDOW_UPDATE frames.
This is taken care by the implementation, exactly like when using
sockets (that use TCP) you don't have to send TCP ACK packets or
retransmit packets.

That's the reason why there is no API to directly send WINDOW_UPDATE frames.

You can interact with the flow control mechanism by providing your own
FlowControlStrategy, but overriding the factory methods in
HTTP2[Client|Server]ConnectionFactory.

Unless you want to really mess up with the protocol, I suggest you
leave the FlowControl mechanism to Jetty.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top