1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

AK: Use size_t for ByteBuffer sizes

This matches what we already do for string types.
This commit is contained in:
Andreas Kling 2020-02-20 12:54:15 +01:00
parent 1dfc66c7cc
commit 88b9fcb976
14 changed files with 75 additions and 70 deletions

View file

@ -90,7 +90,7 @@ public:
s_rpc_clients.set(m_client_id, this);
add_child(*m_socket);
m_socket->on_ready_to_read = [this] {
i32 length;
u32 length;
int nread = m_socket->read((u8*)&length, sizeof(length));
if (nread == 0) {
dbg() << "RPC client disconnected";
@ -117,7 +117,7 @@ public:
void send_response(const JsonObject& response)
{
auto serialized = response.to_string();
i32 length = serialized.length();
u32 length = serialized.length();
m_socket->write((const u8*)&length, sizeof(length));
m_socket->write(serialized);
}