faq.rst revision f3d781aa
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 21f3d781aaSDmitri Tikhonovexample, want to turn them.) 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. 29