How can i enable keep alive in ios app (CFSocket class).
Asked
Active
Viewed 729 times
3
-
if there is any methods to check the server is alive like keep alive mechanism – sps Apr 09 '12 at 06:27
-
1int 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