aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.h
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-03-28 01:48:37 +0000
committerrowanbeentje <rowan@beent.je>2009-03-28 01:48:37 +0000
commit808a76c28f2346befc38a7b6e744987b2bedace1 (patch)
tree49fdbed7febdf85bf6cc4dad76a89e2f87a80169 /Source/CMMCPConnection.h
parent905a44014caa805f2b2621bedef3a76da259c8b1 (diff)
downloadsequelpro-808a76c28f2346befc38a7b6e744987b2bedace1.tar.gz
sequelpro-808a76c28f2346befc38a7b6e744987b2bedace1.tar.bz2
sequelpro-808a76c28f2346befc38a7b6e744987b2bedace1.zip
- Add a preference (currently with no UI) for connection timeout
- Improve connection error messages slightly. - Avoid reading prefs for every keepalive check - now sets connection timeout and keepalive interval on connection setup - Fix and extend connection checks to avoid showing extra errors when the connection has been closed
Diffstat (limited to 'Source/CMMCPConnection.h')
-rw-r--r--Source/CMMCPConnection.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/CMMCPConnection.h b/Source/CMMCPConnection.h
index b26319ee..70b460f1 100644
--- a/Source/CMMCPConnection.h
+++ b/Source/CMMCPConnection.h
@@ -26,11 +26,6 @@
#import <MCPKit_bundled/MCPKit_bundled.h>
#import "CMMCPResult.h"
-// Set the connection timeout to enforce for all connections - used for the initial connection
-// timeout and ping timeouts, but not for long queries/reads/writes.
-// Probably worth moving this to a preference at some point.
-#define SP_CONNECTION_TIMEOUT 10
-
@interface NSObject (CMMCPConnectionDelegate)
- (void)willQueryString:(NSString *)query;
@@ -50,6 +45,8 @@
int connectionPort;
NSString *connectionSocket;
float lastQueryExecutionTime;
+ int connectionTimeout;
+ float keepAliveInterval;
NSTimer *keepAliveTimer;
NSDate *lastKeepAliveSuccess;
@@ -73,7 +70,6 @@
- (void) setDelegate:(id)object;
- (NSTimeZone *) timeZone;
- (BOOL) pingConnection;
-- (double) keepAliveInterval;
- (void) startKeepAliveTimerResettingState:(BOOL)resetState;
- (void) stopKeepAliveTimer;
- (void) keepAlive:(NSTimer *)theTimer;