iOS SDK 的 tcp.h 中未定义 TCP_KEEPINTVL 和 TCP_KEEPCNT
我在尝试在套接字上启用 TCP 保持活动数据包时遇到了困难。这是在 tcp.h 第 201 行中定义的:
#define TCP_KEEPALIVE 0x10 /* idle time used when SO_KEEPALIVE is enabled */
...但是 TCP_KEEPINTVL 和 TCP_KEEPCNT 不存在,而且我还没有找到提到它们的手册页。它们是否在其他地方定义并可能命名为其他名称?它们在 iOS 上被禁用了吗?
I've hit a brick wall trying to enable tcp keep alive packets on a socket. This is defined in tcp.h line 201:
#define TCP_KEEPALIVE 0x10 /* idle time used when SO_KEEPALIVE is enabled */
...but the TCP_KEEPINTVL and TCP_KEEPCNT aren't there, and I haven't found a man page yet that mentions them. Are these defined somewhere else and possibly named something else? Are they disabled for iOS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它们肯定是在 iOS 7 和 OS X 10.9(可能更早)中定义的。
然而,我在苹果开发论坛上发现了一篇帖子,表明它实际上并未实现。
They are certainly defined in iOS 7 and OS X 10.9 (and probably earlier).
However, I've found a post on the Apple dev forums which suggests that it's not actually implemented.