diff options
Diffstat (limited to 'src/Net/ClientConnection.h')
-rw-r--r-- | src/Net/ClientConnection.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Net/ClientConnection.h b/src/Net/ClientConnection.h index e3797a5..c738b1e 100644 --- a/src/Net/ClientConnection.h +++ b/src/Net/ClientConnection.h @@ -33,17 +33,22 @@ class ClientConnection : public Connection { bool connected; IPAddress *peer; + bool connecting; + int sock; gnutls_session_t session; gnutls_anon_client_credentials_t anoncred; + void sendConnectionHeader(bool daemon); + void connectionHeaderReceiveHandler(const void *data, unsigned long length); + protected: virtual gnutls_session_t& getSession() { return session; } public: - ClientConnection() : connected(false) { + ClientConnection() : connected(false), connecting(false) { gnutls_anon_allocate_client_credentials(&anoncred); } @@ -54,13 +59,15 @@ class ClientConnection : public Connection { gnutls_anon_free_client_credentials(anoncred); } - void connect(const IPAddress &address) throw(ConnectionException); + void connect(const IPAddress &address, bool daemon = false) throw(ConnectionException); void disconnect(); virtual bool dataPending() const; virtual bool isConnected() const {return connected;} virtual const IPAddress* getPeer() const {return peer;} + + virtual bool isConnecting() const {return connecting;} }; } |