private-octopus / picoquic

Minimal implementation of the QUIC protocol
MIT License
544 stars 161 forks source link

Management of stream priority using picoquic_set_stream_priority #1620

Closed fbussery closed 8 months ago

fbussery commented 8 months ago

It seems that the priority that is set on client side is lost on server side. Possibly this is the expected behaviour?

Steps to reproduce

I create a stream on client side and set a high priority using picoquic_set_stream_priority (priority 2) Meanwhile I have different streams with lower priority (prio 6) The same server respond to both streams. Stream with prio 6 send a lot of data.

Actual result (observed)

I notice that the response of prio2 stream is delayed too much and behave as if priority have not been set I did notice that adding in the server side the picoquic_set_stream_priority, I have the expected behaviour

Expected result

I was expecting to keep the priority set in the client. But may be this is a normal behaviour?

huitema commented 8 months ago

This is expected behavior. There is no part of the QUIC protocol that carries stream priorities. The settings are local: client's setting affect only the client, server settings affect the server. I you need settings applied on both sides, they should be conveyed through the application protocol and applied at each side.

fbussery commented 8 months ago

Ok Thanks. makes sense. In fact the behaviour wasn't clear for me and I initially mistook in the implementation. Anyway, I can confirm this works fine "as expected".