Removes handler_interface from all transport code

This commit is contained in:
Peter Thorson
2013-01-07 12:30:41 -06:00
parent 6a4173578e
commit ebfb8b8e2f
4 changed files with 2 additions and 27 deletions

View File

@@ -131,7 +131,7 @@ public:
typedef lib::function<void(ptr)> termination_handler;
class handler : public transport_con_type::handler_interface {
class handler {
public:
typedef handler type;
typedef lib::shared_ptr<type> ptr;

View File

@@ -42,9 +42,7 @@ namespace websocketpp {
namespace istate = session::internal_state;
template <typename config>
void connection<config>::set_handler(
handler_ptr new_handler)
{
void connection<config>::set_handler(handler_ptr new_handler) {
std::cout << "connection set_handler" << std::endl;
//scoped_lock_type lock(m_connection_state_lock);
@@ -59,8 +57,6 @@ void connection<config>::set_handler(
}
m_handler = new_handler;
transport_con_type::set_handler(new_handler);
new_handler->on_load(type::shared_from_this(),old_handler);
}

View File

@@ -69,13 +69,6 @@ public:
/// Type of a pointer to the ASIO io_service being used
typedef boost::asio::io_service* io_service_ptr;
// TODO: clean up the rest of these types
class handler_interface {
public:
};
typedef lib::shared_ptr<handler_interface> handler_ptr;
// generate and manage our own io_service
explicit connection(bool is_server)
: m_is_server(is_server)
@@ -233,10 +226,6 @@ protected:
}
}
void set_handler(handler_ptr new_handler) {
m_handler = new_handler;
}
/// Set Connection Handle
/**
* See common/connection_hdl.hpp for information
@@ -284,7 +273,6 @@ private:
// transport resources
io_service_ptr m_io_service;
handler_ptr m_handler;
connection_hdl m_connection_hdl;
std::vector<boost::asio::const_buffer> m_bufs;

View File

@@ -50,10 +50,6 @@ public:
typedef lib::shared_ptr<type> ptr;
// TODO: clean up the rest of these types
class handler_interface {};
typedef lib::shared_ptr<handler_interface> handler_ptr;
typedef typename concurrency::scoped_lock_type scoped_lock_type;
typedef typename concurrency::mutex_type mutex_type;
@@ -162,10 +158,6 @@ protected:
}
}
void set_handler(handler_ptr new_handler) {
m_handler = new_handler;
}
/// Set Connection Handle
/**
* @param hdl The new handle
@@ -223,7 +215,6 @@ private:
// transport resources
std::ostream* output_stream;
handler_ptr m_handler;
connection_hdl m_connection_hdl;
bool m_reading;