This commit is contained in:
Scott E. Graves 2024-12-16 10:30:09 -06:00
parent f82fbf9b55
commit 35e6993629
3 changed files with 3 additions and 3 deletions

View File

@ -206,7 +206,7 @@ public:
return static_cast<std::uint32_t>(buffer_.size());
}
void transfer_into(data_buffer &buffer);
void to_buffer(data_buffer &buffer);
public:
auto operator=(const data_buffer &buffer) noexcept -> packet &;

View File

@ -531,7 +531,7 @@ void packet::encrypt(std::string_view token) {
}
}
void packet::transfer_into(data_buffer &buffer) {
void packet::to_buffer(data_buffer &buffer) {
buffer = std::move(buffer_);
buffer_ = data_buffer();
decode_offset_ = 0;

View File

@ -244,7 +244,7 @@ void packet_server::send_response(std::shared_ptr<connection> conn,
response.encode_top(PACKET_SERVICE_FLAGS);
response.encode_top(conn->nonce);
response.encrypt(encryption_token_);
response.transfer_into(conn->buffer);
response.to_buffer(conn->buffer);
boost::asio::async_write(
conn->socket, boost::asio::buffer(conn->buffer),