Add support for TFO connections
Summary: This adds support to establish connections over TFO. The API introduced here retains the same connect() + write() api that clients currently use. If enableTFO() is called then the connect will be deferred to the first write. This only works with request response protocols since a write must trigger the connect. There is a tradeoff here for the simpler API, and we can address this with other signals such as a short timeout in the future. Even though the client might enable TFO, the program might run on machines without TFO support. There were 2 choices for supporting machines where TFO might not be enabled: 1. Fallback to normal connect if tfo sendmsg fails 2. Check tfo supported on the machine before using it Both these have their tradeoffs, however option 1 does not require us to read from procfs in the common code path. Reviewed By: Orvid Differential Revision: D3327480 fbshipit-source-id: 9ac3a0c7ad2d206b158fdc305641fedbd93aa44d
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment