| | |
| | | // pthread_t recv_thread; |
| | | // <主题, 订阅者> |
| | | SHMTopicSubMap *topic_sub_map; |
| | | std::set<int> *bus_set; |
| | | |
| | | private: |
| | | inline int _recvfrom_(void **buf, int *size, int *port, struct timespec *timeout, int flags); |
| | |
| | | int _pub_( void *topic, int topic_size, void *content, int content_size, int port, struct timespec *timeout, int flags); |
| | | |
| | | void _proxy_desub( char *topic, int port); |
| | | void _proxy_desub_all(int port); |
| | | int _desub_( void *topic, int size, int port, struct timespec *timeout, int flags); |
| | | |
| | | static void foreach_subscripters(std::function<void(SHMKeySet *, SHMKeySet::iterator)> cb) ; |
| | | static bool include_in_keys(int key, int keys[], size_t length); |
| | | static size_t remove_subscripters(int keys[], size_t length) ; |
| | | public: |
| | | static size_t remove_keys(int keys[], size_t length); |
| | | public: |
| | | DModSocket(); |
| | | ~DModSocket(); |
| | |
| | | * 获取soket端口号 |
| | | */ |
| | | int get_port() ; |
| | | |
| | | |
| | | }; |
| | | |
| | | #endif |