add keepalive

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27110 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-11-21 09:47:34 +00:00
parent 8dddc6afcb
commit c1a929d9ad
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-11-20 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/gpbs.m: Use new private method for connection keepalive as
we need it on windows.
2008-11-20 Wolfgang Lux <wolfgang.lux@gmail.com> 2008-11-20 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/x11/XGServerWindow.m ([XGServer -windowlist]): Implement * Source/x11/XGServerWindow.m ([XGServer -windowlist]): Implement

View file

@ -130,6 +130,10 @@ NSConnection *conn = nil;
NSLock *dictionary_lock = nil; NSLock *dictionary_lock = nil;
NSMutableDictionary *pasteboards = nil; NSMutableDictionary *pasteboards = nil;
@interface NSConnection (Private)
- (void) _enableKeepalive;
@end
@interface NSPasteboard (GNULocal) @interface NSPasteboard (GNULocal)
+ (void) _localServer: (id<GSPasteboardSvr>)s; + (void) _localServer: (id<GSPasteboardSvr>)s;
@end @end
@ -1007,6 +1011,13 @@ NSMutableDictionary *pasteboards = nil;
name: NSConnectionDidDieNotification name: NSConnectionDidDieNotification
object: newConn]; object: newConn];
[newConn setDelegate: self]; [newConn setDelegate: self];
/* For ms-windows 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];
}
return YES; return YES;
} }