TCP Fast Open in URLSession

I'm very interested in whether it works and, if so, how the system decides to enable or not TFO when working with the network using URLSession.

I didn't find any information in the documentation.

For example, for NWConnection we need to manually add additional option:

/* Allow fast open on the connection parameters */
parameters.allowFastOpen = true

let connection = NWConnection(to: endpoint, using: parameters)

/* Call send with idempotent initial data before starting the connection */
connection.send(content: initialData, completion: .idempotent)
connection.start(queue: myQueue)
Answered by DTS Engineer in 795378022

AFAICT URLSession has no TFO support.

Speaking personally, TFO seems like a bit of a dead end to me, and if you’re interested in HTTP performance than HTTP/3 (on QUIC) is the way forward.

However, if there’s a specific reason that TFO is critical to your product then you should file an enhancement request explaining that. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

AFAICT URLSession has no TFO support.

Speaking personally, TFO seems like a bit of a dead end to me, and if you’re interested in HTTP performance than HTTP/3 (on QUIC) is the way forward.

However, if there’s a specific reason that TFO is critical to your product then you should file an enhancement request explaining that. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

TCP Fast Open in URLSession
 
 
Q