141 const uint32_t mask = bitmask_for_handshake_type(msg_type);
143 const bool ok = (m_hand_expecting_mask & mask) != 0;
146 const uint32_t seen_so_far = m_hand_received_mask & ~mask;
148 std::ostringstream msg;
152 if(m_hand_expecting_mask == 0) {
153 msg <<
" not expecting messages";
155 msg <<
" expected " << handshake_mask_to_string(m_hand_expecting_mask,
'|');
158 if(seen_so_far != 0) {
159 msg <<
" seen " << handshake_mask_to_string(seen_so_far,
'+');
166 m_hand_received_mask |= mask;
172 m_hand_expecting_mask = 0;