diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-12 14:30:10 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-12 14:30:58 (GMT) |
commit | 2a64272ce320b4f542f2c381fe061a58bc1835fc (patch) | |
tree | 43ff1a0e235e7fe83a5f96704093a155f39e1511 /Swiften/Network/BoostIOServiceThread.h | |
parent | 9d47ed3d783da724c653a17619df904fa7986be7 (diff) | |
download | swift-contrib-2a64272ce320b4f542f2c381fe061a58bc1835fc.zip swift-contrib-2a64272ce320b4f542f2c381fe061a58bc1835fc.tar.bz2 |
Created BoostIOServiceThread.
Diffstat (limited to 'Swiften/Network/BoostIOServiceThread.h')
-rw-r--r-- | Swiften/Network/BoostIOServiceThread.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Swiften/Network/BoostIOServiceThread.h b/Swiften/Network/BoostIOServiceThread.h new file mode 100644 index 0000000..ddc90bf --- /dev/null +++ b/Swiften/Network/BoostIOServiceThread.h @@ -0,0 +1,23 @@ +#pragma once + +#include <boost/asio.hpp> +#include <boost/thread.hpp> + +namespace Swift { + class BoostIOServiceThread { + public: + BoostIOServiceThread(); + ~BoostIOServiceThread(); + + boost::asio::io_service& getIOService() { + return ioService_; + } + + private: + void doRun(); + + private: + boost::asio::io_service ioService_; + boost::thread thread_; + }; +} |