开发者

Does TTURLRequest handle timeouts?

If my connection hangs, is there a way to set a timeout for TTURLReques开发者_开发知识库t?


The kTimeout constant is the initial time constant. You can configure the timeout by following:

[TTURLRequestQueue mainQueue].defaultTimeout = 30; //in case you want 30 seconds


No, the timeout is hardcoded in TTURLRequestQueue.m:

static const NSTimeInterval kTimeout = 300.0;

I really wonder why this is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜