3

How can i enable keep alive in ios app (CFSocket class).

sps
  • 81
  • 5
  • if there is any methods to check the server is alive like keep alive mechanism – sps Apr 09 '12 at 06:27
  • 1
    int enable = 1; setsockopt(CFSocketGetNative(TCPClient),SOL_SOCKET,SO_KEEPALIVE,&enable,sizeof(enable))); Upon successful completion, the value 0 is returned; otherwise the value -1 is returned . – sps Apr 24 '12 at 05:10

0 Answers0