lichao
2021-04-20 ca319178f45ce6256aed7913565d445571f6db22
src/socket.h
@@ -66,7 +66,7 @@
   size_t Pending() const { return mq().Pending(); }
   template <class Body>
   bool Send(const void *valid_remote, const BHMsgHead &head, const Body &body, const RecvCB &cb = RecvCB())
   bool Send(const void *valid_remote, BHMsgHead &head, Body &body, const RecvCB &cb = RecvCB())
   {
      try {
         if (!cb) {
@@ -91,10 +91,10 @@
      return SendImpl(valid_remote, imsg);
   }
   bool SyncRecv(MsgI &msg, bhome::msg::BHMsgHead &head, const int timeout_ms);
   bool SyncRecv(MsgI &msg, bhome_msg::BHMsgHead &head, const int timeout_ms);
   template <class Body>
   bool SendAndRecv(const void *remote, const BHMsgHead &head, const Body &body, MsgI &reply, BHMsgHead &reply_head, const int timeout_ms)
   bool SendAndRecv(const void *remote, BHMsgHead &head, Body &body, MsgI &reply, BHMsgHead &reply_head, const int timeout_ms)
   {
      struct State {
         std::mutex mutex;