diff options
Diffstat (limited to 'src/Net/Connection.h')
-rw-r--r-- | src/Net/Connection.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Net/Connection.h b/src/Net/Connection.h index 6323164..0506d13 100644 --- a/src/Net/Connection.h +++ b/src/Net/Connection.h @@ -62,6 +62,8 @@ class Connection : boost::noncopyable { boost::asio::const_buffer buffer; }; + Core::Application *application; + boost::condition_variable_any stateChanged; State state; @@ -115,8 +117,9 @@ class Connection : boost::noncopyable { void doDisconnect(); - Connection(boost::asio::ssl::context &sslContext) : - state(DISCONNECTED), receiveBuffer(1024*1024), socket(Core::ThreadManager::get()->getIOService(), sslContext) {} + Connection(Core::Application *application0, boost::asio::ssl::context &sslContext) : + application(application0), state(DISCONNECTED), receiveBuffer(1024*1024), receiveSignal(application), connectedSignal(application), + disconnectedSignal(application), socket(application->getIOService(), sslContext) {} public: virtual ~Connection(); |