Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TCP and KeepAlive

9 views
Skip to first unread message

rmal...@gmail.com

unread,
Nov 28, 2007, 12:43:11 PM11/28/07
to
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:

MyClientThread::ClientConnected...
{
bool bFlag = 1;

Connection->Socket->Binding->SetSockOpt( SOL_SOCKET, Id_SO_KEEPALIVE,
(char *) &bFlag, sizeof(bFlag));

}

Thanks in advance !

0 new messages