1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-14 18:07:35 +00:00
serenity/Servers/WindowServer/WSEventLoop.h
Andreas Kling fe45f5a6d2 LibCore: Port CoreIPCServer to using CLocalServer.
Use CLocalServer to listen for connections in WindowServer and AudioServer.
This allows us to accept incoming CLocalSocket objects from the CLocalServer
and construct client connections based on those.

Removed COpenedSocket since it's replaced by CLocalSocket.
2019-07-27 10:53:50 +02:00

29 lines
624 B
C++

#pragma once
#include <AK/ByteBuffer.h>
#include <LibCore/CEventLoop.h>
#include <LibCore/CLocalServer.h>
#include <LibCore/CNotifier.h>
class WSClientConnection;
struct WSAPI_ClientMessage;
class WSEventLoop {
public:
WSEventLoop();
virtual ~WSEventLoop();
int exec() { return m_event_loop.exec(); }
private:
void drain_mouse();
void drain_keyboard();
CEventLoop m_event_loop;
int m_keyboard_fd { -1 };
OwnPtr<CNotifier> m_keyboard_notifier;
int m_mouse_fd { -1 };
OwnPtr<CNotifier> m_mouse_notifier;
CLocalServer m_server_sock;
OwnPtr<CNotifier> m_server_notifier;
};