iPhone - 如何禁用网络省电模式
在制作 Game Center GKMatch 游戏时,我开始意识到,如果我在 100 毫秒(或类似的情况)内不发送/接收任何内容,iPhone 网络硬件将进入省电模式。退出省电模式可能需要 500 毫秒,这很糟糕。为了防止这种情况发生,我只是定期发送一些东西。但我真的不想这样做,因为它耗尽了人们每月的 3G 数据使用量。
有没有某种方法可以以编程方式禁用网络节能?
Whilst making a Game Center GKMatch game I've come to realise the iphone networking hardware will go into power save mode if I don't transmit/receive anything within 100ms (or something like that). Coming out of power save mode can take 500ms, which is bad. To prevent this from happening I just send something periodically. But I don't REALLY want to do that because it uses up people's monthly 3G data usage.
Is there some way to programmatically disable power saving for networking?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有尝试过这个,但是您可以定期向 localhost (
127.0.0.1
) 发送一些内容,以保持连接,而不通过 WWAN 或 wi-fi 吗?I haven't tried this, but can you send something to localhost (
127.0.0.1
) periodically, to keep the connection up, without going over WWAN or wi-fi?