25 #include <boost/shared_ptr.hpp>
46 public:
void Init(uint16_t _port);
67 private:
void ProcessMessage(
const unsigned int _connectionIndex,
68 const std::string &_data);
74 private:
void OnRead(
const unsigned int _connectionIndex,
75 const std::string &_data);
84 private: msgs::Publish GetPublisher(
const std::string &_topic);
96 private:
void RemoveConnection(
unsigned int _index);
101 private:
void RemovePublisher(
const msgs::Publish _pub);
106 private:
void RemoveSubscriber(
const msgs::Subscribe _sub);
109 typedef std::map<unsigned int, transport::ConnectionPtr> Connection_M;
112 typedef std::list< std::pair<msgs::Publish, transport::ConnectionPtr> >
116 typedef std::list< std::pair<msgs::Subscribe, transport::ConnectionPtr> >
120 private: PubList publishers;
123 private: SubList subscribers;
126 private: Connection_M connections;
129 private: std::list<std::string> worldNames;
132 private: std::list<std::pair<unsigned int, std::string> > msgs;
138 private: boost::thread *runThread;
144 private: boost::recursive_mutex *connectionMutex;
147 private: boost::recursive_mutex *msgsMutex;