开发者

Does TTURLRequest handle timeouts?

开发者 https://www.devze.com 2023-01-05 21:43 出处:网络
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:

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

精彩评论

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

关注公众号