peakzhang 发表于 2007-12-13 00:00:38

ace中如何设置keepalive属性

keepalive 属性是干什么用的?

peakzhang 发表于 2007-12-13 00:00:56

UNIX下

if (ACE_OS::setsockopt(handle_, SOL_SOCKET, SO_KEEPALIVE, (const char*)&keepAlive, sizeof(keepAlive)) == -1)
      {
            ACE_DEBUG((LM_INFO, ACE_TEXT("(%P|%t) setsockopt SO_KEEPALIVE error!\n")));
      }

peakzhang 发表于 2007-12-13 00:01:18

参考UNIX网络编程卷一的说明
页: [1]
查看完整版本: ace中如何设置keepalive属性