mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:32:44 +00:00 
			
		
		
		
	 fe45f5a6d2
			
		
	
	
		fe45f5a6d2
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			624 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			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;
 | |
| };
 |