#ifndef _bus_nng_wrap_h_ #define _bus_nng_wrap_h_ #include namespace nng_wrap { void copy_memory(void** dest, int *dest_len, const void* src, const int src_len); void get_last_error(int* ec, void** emsg, int* emsg_len); void free_nng(void* data, const int data_len); int simple_request(const std::string& url, const void* in, const int in_len, void** out, int *out_len, const int to_ms); int request2(const std::string &ipc, const void* r, const int r_len, void** reply, int* reply_len, const int to_ms); int start_reply(const std::string& url, const int port); int read_request(void** src, std::string* msg, const int to_ms); int send_reply(const void* src, const void* msg, const int msg_len); int publish(const std::string& topic, const void* data, const int data_len); int subscribe_center(const std::string& url); int subscribe_topic(const std::string& topic); int unsubscribe_topic(const std::string& topic); int subscribe_read(std::string* topic, std::string* msg, const int to_ms); int respond_survey(const std::string& url, std::string&& fixed_msg); } #endif