Enable keepalive on socket connections

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21310 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-06-15 03:56:13 +00:00
parent 433e72bc8d
commit 131e658ae2
4 changed files with 39 additions and 0 deletions

View file

@ -469,6 +469,10 @@ static Class runLoopClass;
}
else
{
int status = 1;
setsockopt(desc, SOL_SOCKET, SO_KEEPALIVE, (char*)&status,
sizeof(status));
addrNum = 0;
caller = YES;
[aPort addHandle: self forSend: YES];
@ -1631,6 +1635,10 @@ static int unique_index = 0;
}
else
{
int status = 1;
setsockopt(desc, SOL_SOCKET, SO_KEEPALIVE, (char*)&status,
sizeof(status));
/*
* Create a handle for the socket and set it up so we are its
* receiving port, and it's waiting to get the port name from