25 #include <boost/shared_ptr.hpp>
39 typedef std::map<unsigned int, transport::ConnectionPtr> Connection_M;
50 public:
void Init(uint16_t _port);
71 private:
void ProcessMessage(
const unsigned int _connectionIndex,
72 const std::string &_data);
78 private:
void OnRead(
const unsigned int _connectionIndex,
79 const std::string &_data);
88 private: msgs::Publish GetPublisher(
const std::string &_topic);
101 private:
void RemoveConnection(Connection_M::iterator _connIter);
106 private:
void RemovePublisher(
const msgs::Publish _pub);
111 private:
void RemoveSubscriber(
const msgs::Subscribe _sub);
114 typedef std::list< std::pair<msgs::Publish, transport::ConnectionPtr> >
118 typedef std::list< std::pair<msgs::Subscribe, transport::ConnectionPtr> >
122 private: PubList publishers;
125 private: SubList subscribers;
128 private: Connection_M connections;
131 private: std::list<std::string> worldNames;
134 private: std::list<std::pair<unsigned int, std::string> > msgs;
140 private: boost::thread *runThread;
146 private: boost::recursive_mutex *connectionMutex;
149 private: boost::recursive_mutex *msgsMutex;