From db25a5807c7f7bd50c3a0b1589cc60330fafcfd8 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 5 Aug 2007 12:29:02 -0700 Subject: [PATCH] Adding a method to check and see if the connection we have is valid * Source/DebuggerConnection.m|h: ([DebuggerConnection isConnected]): New method --- Source/DebuggerConnection.h | 1 + Source/DebuggerConnection.m | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Source/DebuggerConnection.h b/Source/DebuggerConnection.h index 8fac6e7..7d848ef 100644 --- a/Source/DebuggerConnection.h +++ b/Source/DebuggerConnection.h @@ -38,6 +38,7 @@ - (int)port; - (NSString *)session; - (NSString *)remoteHost; +- (BOOL)isConnected; // communication - (void)run; diff --git a/Source/DebuggerConnection.m b/Source/DebuggerConnection.m index 5f42ccf..3f08c6d 100644 --- a/Source/DebuggerConnection.m +++ b/Source/DebuggerConnection.m @@ -101,6 +101,14 @@ return [_socket remoteHost]; } +/** + * Returns whether or not we have an active connection + */ +- (BOOL)isConnected +{ + return _connected; +} + /** * SocketWrapper delegate method that is called whenever new data is received */ -- 2.43.5