Move most StreamBuffer code into base-buffer.hpp
This commit is contained in:
@@ -204,10 +204,7 @@ public:
|
||||
int64_t nactor = world_->patch_everything(sb, &dbc);
|
||||
if (nactor != actor_id_) change_actor_id(nactor);
|
||||
dbc.dump(stdostream());
|
||||
} catch (const StreamEof &seof) {
|
||||
abandon_server();
|
||||
return;
|
||||
} catch (const StreamCorruption &scorr) {
|
||||
} catch (const StreamException &sexcept) {
|
||||
abandon_server();
|
||||
return;
|
||||
}
|
||||
@@ -222,7 +219,8 @@ public:
|
||||
sb->unread_to(tr_before);
|
||||
return false;
|
||||
}
|
||||
StreamBuffer body(sb->read_bytes(message_body_len), message_body_len);
|
||||
const char *message_body = sb->read_bytes(message_body_len);
|
||||
StreamBuffer body(std::string_view(message_body, message_body_len));
|
||||
if (message_type == util::MSG_ACK) {
|
||||
receive_ack_from_server(&body);
|
||||
} else if (message_type == util::MSG_DIFF) {
|
||||
|
||||
Reference in New Issue
Block a user