1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:08:10 +00:00

LibIPC: Move more of IPC::Connection to ConnectionBase

This patch moves the templated message parsing code to a virtual
try_parse_messages() helper. By doing that, we can move the rest of the
socket draining code up to ConnectionBase and keep it out of line.
This commit is contained in:
Andreas Kling 2021-10-23 22:16:53 +02:00
parent f3c4a357ea
commit 8728d36dd0
3 changed files with 39 additions and 31 deletions

View file

@ -30,7 +30,7 @@ public:
, m_client_id(client_id)
{
VERIFY(this->socket().is_connected());
this->socket().on_ready_to_read = [this] { this->drain_messages_from_peer(); };
this->socket().on_ready_to_read = [this] { this->drain_messages_from_peer(ServerEndpoint::static_magic()); };
}
virtual ~ClientConnection() override