summaryrefslogtreecommitdiffstats
path: root/src/Net/ClientConnection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Net/ClientConnection.h')
-rw-r--r--src/Net/ClientConnection.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Net/ClientConnection.h b/src/Net/ClientConnection.h
index bdd7872..f93c2fc 100644
--- a/src/Net/ClientConnection.h
+++ b/src/Net/ClientConnection.h
@@ -23,24 +23,27 @@
#include "Connection.h"
#include "Exception.h"
+#include <boost/utility/base_from_member.hpp>
+
+
namespace Mad {
namespace Net {
class IPAddress;
-class ClientConnection : public Connection {
+class ClientConnection : private boost::base_from_member<boost::asio::ssl::context>, public Connection {
private:
- bool daemon;
-
- void connectionHeaderReceiveHandler(const void *data, unsigned long length);
-
- protected:
- virtual void connectionHeader();
+ void handleConnect(const boost::system::error_code& error);
public:
- ClientConnection() : daemon(0) {}
-
- void connect(const IPAddress &address, bool daemon0 = false) throw(Exception);
+ ClientConnection()
+ : boost::base_from_member<boost::asio::ssl::context>(boost::ref(Connection::ioService), boost::asio::ssl::context::sslv23),
+ Connection(member)
+ {
+ member.set_verify_mode(boost::asio::ssl::context::verify_none);
+ }
+
+ void connect(const boost::asio::ip::tcp::endpoint &address) throw(Exception);
};
}