must be called only from asio thread
| 994 | |
| 995 | //must be called only from asio thread |
| 996 | void OnReceiveMessage() { |
| 997 | //DBGOUT("OnReceiveMessage"); |
| 998 | const TBaseHeader& hdr = Msg_.BaseHeader(); |
| 999 | |
| 1000 | if (hdr.Type == TBaseHeader::Response) { |
| 1001 | ProcessReqsInFlyQueue(); |
| 1002 | TReqsInFly::iterator it = ReqsInFly_.find(hdr.Id); |
| 1003 | if (it == ReqsInFly_.end()) { |
| 1004 | DBGOUT("ignore response: " << hdr.Id); |
| 1005 | return; |
| 1006 | } |
| 1007 | |
| 1008 | it->second->OnResponse(Msg_); |
| 1009 | ReqsInFly_.erase(it); |
| 1010 | } else { |
| 1011 | throw yexception() << TStringBuf("unsupported message type: ") << hdr.Type; |
| 1012 | } |
| 1013 | } |
| 1014 | |
| 1015 | TRequestId LastSendedRequestId() const noexcept { |
| 1016 | return LastSendedReqId_.load(std::memory_order_acquire); |
nothing calls this directly
no test coverage detected