We have a protocol between our client and our server which
It looks like we have a chance to update our networking, but from my initial reading it looks like the NSURLSessionStreamTask doesn't handle the initial HTTP exchange we need, and the NSURLSession variants that *do* do an initial HTTP exchange aren't really streaming data without framing later.
Q1: Are there APIs that can handle the initial HTTP exchange without assuming they control the whole connection? I.e., handle the HTTP parsing & logic, but over a connection that we've set up separately?
Q2: Is there a way to make the upload/download tasks act as a raw data stream?
Q3: Any other ideas about how to address this particular problem?
WebSockets, or any other solution that requires a server-side change is a non-starter for us...
Using the Network framework as a BSD sockets replacement gets us part way there, but we're still relying on CF functions for some HTTP functionality.
Creates a TLS connection
Does an HTTP get/response on the connection, where the HTTP headers are specifying characteristics of the session
Sends and receives arbitrary amounts of streaming data on the connection
None of the data after the initial get/response has any HTTP framing at all.
Data has to be using the same TCP connection as the initial HTTP exchange
Common code for iOS/macOS.
Usable from a Network Extension
It looks like we have a chance to update our networking, but from my initial reading it looks like the NSURLSessionStreamTask doesn't handle the initial HTTP exchange we need, and the NSURLSession variants that *do* do an initial HTTP exchange aren't really streaming data without framing later.
Q1: Are there APIs that can handle the initial HTTP exchange without assuming they control the whole connection? I.e., handle the HTTP parsing & logic, but over a connection that we've set up separately?
Q2: Is there a way to make the upload/download tasks act as a raw data stream?
Q3: Any other ideas about how to address this particular problem?
WebSockets, or any other solution that requires a server-side change is a non-starter for us...
Using the Network framework as a BSD sockets replacement gets us part way there, but we're still relying on CF functions for some HTTP functionality.