From 69fb256087239f206ae132e56bb6475177068631 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Wed, 7 Mar 2012 08:13:46 -0600 Subject: [PATCH] some temporary fixes for windows builds --- src/connection.hpp | 9 ++++++--- src/endpoint.hpp | 11 +++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/connection.hpp b/src/connection.hpp index 0d7dc31453..4a14d054a1 100644 --- a/src/connection.hpp +++ b/src/connection.hpp @@ -238,7 +238,8 @@ public: typename endpoint::alogger_type& alog() { return m_endpoint.alog(); } -protected: +public: +//protected: TODO: figure out why VCPP2010 doesn't like protected here void handle_socket_init(const boost::system::error_code& error) { if (error) { m_endpoint.elog().at(log::elevel::RERROR) @@ -356,7 +357,8 @@ public: ); } } -protected: +public: +//protected: TODO: figure out why VCPP2010 doesn't like protected here void process_data(message::data_ptr msg) { get_handler()->on_message(type::shared_from_this(),msg); } @@ -712,7 +714,8 @@ protected: handler_ptr get_handler() { return m_handler; } -protected: +public: +//protected: TODO: figure out why VCPP2010 doesn't like protected here endpoint_type& m_endpoint; handler_ptr m_handler; diff --git a/src/endpoint.hpp b/src/endpoint.hpp index 337466ceb7..514f7a3538 100644 --- a/src/endpoint.hpp +++ b/src/endpoint.hpp @@ -106,14 +106,17 @@ public: // functions in the derived endpoint. This is done to limit the use of // public methods in endpoint and its CRTP bases to only those methods // intended for end-application use. +#ifdef _WEBSOCKETPP_CPP11_FRIEND_ + // Highly simplified and preferred C++11 version: + friend role_type; + friend socket_type; + friend connection_type; +#else friend class role< endpoint >; friend class socket< endpoint >; friend class connection::template connection,socket< type >::template connection>; +#endif - // Highly simplified and preferred C++11 version: - // friend role_type; - // friend socket_type; - // friend connection_type; /// Construct an endpoint. /**