diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-05-20 01:08:16 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-05-20 01:08:16 +0200 |
commit | 776377bb21ee1cfe0bcdbc000f7c6fa0be227226 (patch) | |
tree | a60e8bdd92678dece5fbb96e75535eba2b61b7da /src/Net/ClientConnection.h | |
parent | badc0da3b74d99c90b7b28180d08cd6d08830254 (diff) | |
download | mad-776377bb21ee1cfe0bcdbc000f7c6fa0be227226.tar mad-776377bb21ee1cfe0bcdbc000f7c6fa0be227226.zip |
Netzwerk-Code auf boost::asio umgestellt
Diffstat (limited to 'src/Net/ClientConnection.h')
-rw-r--r-- | src/Net/ClientConnection.h | 23 |
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); }; } |