#include <Communication.h>
Public Member Functions | |
asio::io_service & | asioService () |
CastorChannelPtr | create (const std::string spec) throw (NetException) |
CastorChannelPtr | create (const NetAddress &address) throw (NetException) |
void | run () |
void | start (size_t threads=2) |
void | stop () |
void | wait () |
virtual | ~Communication () |
Static Public Member Functions | |
static CommunicationPtr | getInstance () |
Protected Member Functions | |
Communication () | |
Protected Attributes | |
bool | initialised |
asio::io_service | service |
Private Types | |
typedef std::vector< ThreadPtr > | ThreadPool |
typedef boost::shared_ptr < asio::thread > | ThreadPtr |
Private Attributes | |
ThreadPool | threadPool |
Static Private Attributes | |
static CommunicationPtr | instance |
static boost::mutex | mutex |
Friends | |
class | CastorChannel |
Definition at line 17 of file Communication.h.
typedef std::vector<ThreadPtr> castor::net::Communication::ThreadPool [private] |
Definition at line 25 of file Communication.h.
typedef boost::shared_ptr<asio::thread> castor::net::Communication::ThreadPtr [private] |
Definition at line 24 of file Communication.h.
castor::net::Communication::Communication | ( | ) | [protected] |
Definition at line 8 of file Communication.cpp.
castor::net::Communication::~Communication | ( | ) | [virtual] |
Definition at line 13 of file Communication.cpp.
Definition at line 81 of file Communication.cpp.
CastorChannelPtr castor::net::Communication::create | ( | const std::string | spec | ) | throw (NetException) |
Definition at line 27 of file Communication.cpp.
CastorChannelPtr castor::net::Communication::create | ( | const NetAddress & | address | ) | throw (NetException) |
Definition at line 31 of file Communication.cpp.
CommunicationPtr castor::net::Communication::getInstance | ( | ) | [static] |
Definition at line 16 of file Communication.cpp.
void castor::net::Communication::run | ( | ) |
Definition at line 35 of file Communication.cpp.
void castor::net::Communication::start | ( | size_t | threads = 2 | ) |
Definition at line 41 of file Communication.cpp.
void castor::net::Communication::stop | ( | ) |
Definition at line 58 of file Communication.cpp.
void castor::net::Communication::wait | ( | ) |
Definition at line 75 of file Communication.cpp.
friend class CastorChannel [friend] |
Definition at line 31 of file Communication.h.
bool castor::net::Communication::initialised [protected] |
Definition at line 34 of file Communication.h.
CommunicationPtr castor::net::Communication::instance [static, private] |
Definition at line 22 of file Communication.h.
boost::mutex castor::net::Communication::mutex [static, private] |
Definition at line 21 of file Communication.h.
asio::io_service castor::net::Communication::service [protected] |
Definition at line 33 of file Communication.h.
Definition at line 27 of file Communication.h.