mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
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:
parent
433e72bc8d
commit
131e658ae2
4 changed files with 39 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue