From aaf5f51c354d371f6f806c68ea37fb492409ea04 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Sun, 8 Jan 2012 20:21:47 -0600 Subject: [PATCH] exposes is_server through connection objects --- src/roles/client.hpp | 4 ++++ src/roles/server.hpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/roles/client.hpp b/src/roles/client.hpp index 3729396249..000c4e6cad 100644 --- a/src/roles/client.hpp +++ b/src/roles/client.hpp @@ -114,6 +114,10 @@ public: int32_t rand() { return m_endpoint.rand(); } + + bool is_server() const { + return false; + } // should this exist? boost::asio::io_service& get_io_service() { diff --git a/src/roles/server.hpp b/src/roles/server.hpp index 6cf0ac82c3..91dac63435 100644 --- a/src/roles/server.hpp +++ b/src/roles/server.hpp @@ -112,6 +112,10 @@ public: return 0; } + bool is_server() const { + return true; + } + // should this exist? boost::asio::io_service& get_io_service() { return m_endpoint.get_io_service();