1f3d781aaSDmitri Tikhonov************************** 2f3d781aaSDmitri TikhonovFrequently Asked Questions 3f3d781aaSDmitri Tikhonov************************** 4f3d781aaSDmitri Tikhonov 5f3d781aaSDmitri TikhonovAPI/Design 6f3d781aaSDmitri Tikhonov========== 7f3d781aaSDmitri Tikhonov 8f3d781aaSDmitri Tikhonov*Why have a separate engine for server and client? Surely traffic 9f3d781aaSDmitri Tikhonovcould be differentiated as much as it needs to be internally in one 10f3d781aaSDmitri Tikhonovengine?* 11f3d781aaSDmitri Tikhonov 12f3d781aaSDmitri TikhonovThe traffic *cannot* be differentiated for gQUIC versions Q046 and Q050. 13f3d781aaSDmitri TikhonovThis is because in these versions, the server never includes a connection 14f3d781aaSDmitri TikhonovID into the packets it sends to the client. To have more than one 15f3d781aaSDmitri Tikhonovconnection, then, the client must open a socket per connection: otherwise, 16f3d781aaSDmitri Tikhonovthe engine would not be able to dispatch incoming packets to correct 17f3d781aaSDmitri Tikhonovconnections. 18f3d781aaSDmitri Tikhonov 19f3d781aaSDmitri TikhonovTo aid development, there is a :macro:`LSQUIC_FORCED_TCID0_VERSIONS` that 20f3d781aaSDmitri Tikhonovspecifies the list of versions with 0-sized connections. (If you, for 2104f8f447SDmitri Tikhonovexample, want to turn them off.) 22f3d781aaSDmitri Tikhonov 23f3d781aaSDmitri TikhonovOnce gQUIC becomes deprecated in the future, there will remain no technical 24f3d781aaSDmitri Tikhonovreason why a single engine instance could not be used both for client and 25f3d781aaSDmitri Tikhonovserver connections. It will be just work. For example, the single 26f3d781aaSDmitri Tikhonovengine settings :type:`lsquic_engine_settings` will have to be separated 27f3d781aaSDmitri Tikhonovinto client and server settings, as the two usually do need to have 28f3d781aaSDmitri Tikhonovseparate settings. 29758aff32SDmitri Tikhonov 30758aff32SDmitri TikhonovExample Programs 31758aff32SDmitri Tikhonov================ 32758aff32SDmitri Tikhonov 33758aff32SDmitri Tikhonov*http_client does not work with www.google.com, www.facebook.com, etc.* 34758aff32SDmitri Tikhonov 35758aff32SDmitri TikhonovCheck the version. By defaut, ``http_client`` will use the latest supported 36758aff32SDmitri Tikhonovversion (at the time of this writing, "h3-31"), while the server may be using 37758aff32SDmitri Tikhonovan older version, such as "h3-29". Adding ``-o version=h3-29`` to the 38758aff32SDmitri Tikhonovcommand line may well solve your issue. 39758aff32SDmitri Tikhonov 40758aff32SDmitri TikhonovThere is an `outstanding bug`_ where lsquic client does not perform version 41758aff32SDmitri Tikhonovnegotiation correctly for HTTP/3. We do not expect this to be fixed, because 42758aff32SDmitri Tikhonova) this version negotiation mechanism is likely to become defunct when QUIC v1 43758aff32SDmitri Tikhonovis released and b) version negotiation is not necessary for an HTTP/3 client, 44758aff32SDmitri Tikhonovbecause the other side's version is communicated to it via the ``Alt-Svc`` HTTP 45758aff32SDmitri Tikhonovheader. 46758aff32SDmitri Tikhonov 47758aff32SDmitri Tikhonov.. _`outstanding bug`: https://github.com/litespeedtech/lsquic/issues/180 48