TCP and KeepAlive

2007-11-29 01:43:11 AM
Hi guys, sorry for my english.
I need allow / disallow the TCP KeepAlive protocol in TCPServer
application using Indy components, I investigated the use of
SetSocketOpt method, but I don't make the correct funtionality.
Example on my socket connection on connect handler:
bool bFlag = 1;
Connection->Socket->Binding->SetSockOpt( SOL_SOCKET, Id_SO_KEEPALIVE,
(char *) &bFlag, sizeof(bFlag));
Thanks in advance !