31 #include <boost/thread/thread.hpp>
33 #include <boost/asio.hpp>
34 #include <boost/asio/ip/tcp.hpp>
36 #include <rsc/logging/Logger.h>
38 #include <rsc/patterns/Singleton.h>
59 class RSB_EXPORT
Factory :
public rsc::patterns::Singleton<Factory> {
60 friend class rsc::patterns::Singleton<
Factory>;
71 const std::string& host,
72 const boost::uint16_t& port,
77 typedef std::pair<std::string, boost::uint16_t>
Endpoint;
78 typedef boost::shared_ptr<boost::asio::ip::tcp::socket>
SocketPtr;
80 typedef boost::shared_ptr<boost::asio::io_service::work>
WorkPtr;
97 BusPtr getBusClientFor(
const std::string& host,
103 boost::uint16_t port,
107 void removeBusClient(
BusPtr bus);
109 void removeBusServer(
BusPtr bus);
111 static void checkOptions(
BusPtr bus,
bool tcpnodelay);