Permalink
Browse files

Send a generic notification whenever the connection status changes

  • Loading branch information...
1 parent 3db240b commit c6cb53a41a83b7b321311cc93bbfed7ba9295ffd @benlangfeld committed Jan 16, 2011
Showing with 9 additions and 0 deletions.
  1. +2 −0 TNStropheConnection.j
  2. +7 −0 TNStropheGlobals.j
View
2 TNStropheConnection.j
@@ -204,10 +204,12 @@
break;
}
}
+
if ([_delegate respondsToSelector:selector])
[_delegate performSelector:selector withObject:self];
[[CPNotificationCenter defaultCenter] postNotificationName:notificationName object:self];
+ [[CPNotificationCenter defaultCenter] postNotificationName:TNStropheConnectionStatusDidChangeNotification object:self];
}, /* wait */ _connectionTimeout, /* hold */ _maxConnections);
}
View
7 TNStropheGlobals.j
@@ -80,6 +80,13 @@ TNStropheConnectionStatusDisconnected = @"TNStropheConnectionStatusDisconn
*/
TNStropheConnectionStatusError = @"TNStropheConnectionStatusError";
+/*!
+ @global
+ @group TNStropheConnectionStatus
+ Notification sent when the connection status changes
+*/
+TNStropheConnectionStatusDidChangeNotification = @"TNStropheConnectionStatusDidChangeNotification";
+
#pragma mark -
#pragma mark globals of TNStropheClient

0 comments on commit c6cb53a

Please sign in to comment.