From 776377bb21ee1cfe0bcdbc000f7c6fa0be227226 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 20 May 2009 01:08:16 +0200 Subject: Netzwerk-Code auf boost::asio umgestellt --- src/Net/ClientConnection.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/Net/ClientConnection.h') 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 + + namespace Mad { namespace Net { class IPAddress; -class ClientConnection : public Connection { +class ClientConnection : private boost::base_from_member, 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::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); }; } -- cgit v1.2.3