Permalink
Browse files

- (BOOL)connected;

  • Loading branch information...
1 parent 700621b commit 19fb4614316ffed1e099a22fd408772e931e5fcd @mxcl committed Oct 18, 2011
Showing with 6 additions and 0 deletions.
  1. +1 −0 MBWebSocketServer.h
  2. +5 −0 MBWebSocketServer.m
View
@@ -23,6 +23,7 @@
@property (nonatomic, readonly) NSUInteger port;
@property (nonatomic, assign) id<MBWebSocketServerDelegate> delegate;
+@property (nonatomic, readonly) BOOL connected;
@end
View
@@ -41,6 +41,10 @@ - (void)close {
}
}
+- (BOOL)connected {
+ return client != nil;
+}
+
- (void)respondToHandshake:(NSData *)data {
NSString *string = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
@@ -169,6 +173,7 @@ - (void)dealloc {
@synthesize port;
@synthesize delegate;
+@dynamic connected;
@end

0 comments on commit 19fb461

Please sign in to comment.