implement keeplaive system.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27108 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-11-21 09:43:12 +00:00
parent cdbf2720e4
commit cfb2246936
2 changed files with 19 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2008-11-20 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Foundation/NSConnection.h: New ivars
* Source/NSConnection.m: Add diuagnostic information and implement
private mechanism for keepalive (for mswindows, where the NSMessagePort
implementation doesn;t know if the remote end has gone away until it
attempts to send to it).
* Tools/gdnc..m: Use private keepalive mechanism.
2008-11-19 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSData.m: Fix bug #24883

View file

@ -173,6 +173,9 @@ ihandler(int sig)
}
@end
@interface NSConnection (Private)
- (void) _enableKeepalive;
@end
@interface GDNCNotification : NSObject
{
@ -605,7 +608,13 @@ ihandler(int sig)
name: NSConnectionDidDieNotification
object: newConn];
[newConn setDelegate: self];
[newConn _enableKeepalive];
/* For ms-windoews we need to enable keepalive on the connection so that
* we will find out if the remote end goes away.
*/
if ([newConn respondsToSelector: @selector(_enableKeepalive)])
{
[newConn _enableKeepalive];
}
/*
* Create a new map table entry for this connection with a value that
* is a table (normally with a single entry) containing registered