twitter-archive / CocoaSPDY

SPDY for iOS and OS X
Apache License 2.0
2.39k stars 233 forks source link

SPDY for iOS with AFNetworking #36

Closed xialin closed 10 years ago

xialin commented 10 years ago

I'm using AFNetworking2.1.0 and trying to add SPDY (with no success yet). After calling registerOrigin, the requests always get Timed Out.

NSString *spdyURL = [NSString stringWithFormat:@"%@://%@:443",url.scheme, url.host];

[SPDYURLConnectionProtocol registerOrigin:spdyURL];

Note: I'm using Google App Engine, the baseURL I use is something like https://myapp.appspot.com/_ah and I was trying to register origin https://myapp.appsport.com:443

goaway commented 10 years ago

CocoaSPDY should work fine with AFNetworking, but my guess is the issue you're running into is one a few others have encountered: Google and Google App Engine both rely on NPN to negotiate SPDY, whereas CocoaSPDY requires an endpoint that can infer the protocol directly, or that has been configured ahead of time to be speak SPDY.