| | |
| | | |
| | | namespace nng_wrap { |
| | | |
| | | static thread_local std::string verbose_info{}; |
| | | #define TAG |
| | | #define PRNTVITAG(args) |
| | | |
| | | /* |
| | | #ifndef PRNTVITAG |
| | | static thread_local std::string verbose_info{}; |
| | | #define TAG do{ verbose_info.clear(); \ |
| | | verbose_info=string("function [")+__FUNCTION__+string("]"); \ |
| | | }while(0) |
| | | #define PRNTVITAG(msg) do{ \ |
| | | verbose_info+=string("-> (") + msg + string(")"); \ |
| | | }while(0) |
| | | // #define TAG |
| | | // #define PRNTVITAG(args) |
| | | #endif |
| | | */ |
| | | |
| | | ///////////////////////////////////////////////// |
| | | enum{ |
| | |
| | | }; |
| | | |
| | | enum { INIT, RECV, WAIT, SEND }; |
| | | enum { REPLY_IPC, REPLY_TCP }; |
| | | struct work { |
| | | int state{-1}; |
| | | nng_aio *aio{}; |
| | |
| | | nng_ctx ctx{}; |
| | | void(*cb_recv)(work*){}; |
| | | void* user_data{}; |
| | | int mode{-1}; |
| | | }; |
| | | |
| | | static const std::string rr_unblocking_msg_{"~!@#$%^&*()-=<<UNBLOCKING>>=-()*&^%$#@!~"}; |