+ switch (type) {
+ case message_type::CTRL:
+ oss << "CTRL: " << amount << " (info)";
+ if (opt::bookkeeping)
+ oss << "; " << credit << " (credit)";
+ break;
+ case message_type::DATA:
+ oss << "DATA: " << amount << " (load)";
+ break;
+ case message_type::CTRL_CLOSE:
+ oss << "CTRL_CLOSE";
+ break;
+ case message_type::DATA_CLOSE:
+ oss << "DATA_CLOSE";
+ break;
+ default:
+ oss << "UNKNOWN MESSAGE TYPE: " << static_cast<int>(type);
+ break;
+ }