summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Net/Connection.h')
-rw-r--r--src/Net/Connection.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/Net/Connection.h b/src/Net/Connection.h
index a40407c..c8b45c6 100644
--- a/src/Net/Connection.h
+++ b/src/Net/Connection.h
@@ -20,16 +20,30 @@
#ifndef MAD_NET_CONNECTION_H_
#define MAD_NET_CONNECTION_H_
+#include <gnutls/gnutls.h>
+
namespace Mad {
namespace Net {
+class IPAddress;
+
class Connection {
public:
- Connection();
- virtual ~Connection();
+ virtual ~Connection() {}
+
+ virtual bool isConnected() const = 0;
+ virtual const IPAddress* getPeer() const = 0;
+
+ static void init() {
+ gnutls_global_init();
+ }
+
+ static void deinit() {
+ gnutls_global_deinit();
+ }
};
}
}
-#endif /*CONNECTION_H_*/
+#endif /*MAD_NET_CONNECTION_H_*/