preliminary cleanup for client role

This commit is contained in:
Peter Thorson
2011-12-05 17:12:06 -06:00
parent 14f0fe09f1
commit efd5b8d8b1
2 changed files with 28 additions and 30 deletions

View File

@@ -42,7 +42,21 @@ namespace role {
template <class endpoint>
class client {
public:
// handler interface callback class
// Connection specific details
template <typename connection_type>
class connection {
public:
typedef connection<connection_type> type;
typedef endpoint endpoint_type;
connection(endpoint& e) : m_endpoint(e) {}
private:
endpoint& m_endpoint;
connection_type& m_connection;
};
// handler interface callback class
class handler {
virtual void on_action() = 0;
};
@@ -63,15 +77,7 @@ public:
static_cast< endpoint_type* >(this)->start();
}
// Connection specific details
template <typename connection_type>
class connection {
public:
connection(server<endpoint_type>& e) {}
private:
};
protected:
bool is_server() {
return false;