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

LibIPC+AudioServer: Allow unsolicited server-to-client IPC messages

Client-side connection objects must now provide both client and server
endpoint types. When a message is received from the server side, we try
to decode it using both endpoint types and then send it to the right
place for handling.

This now makes it possible for AudioServer to send unsolicited messages
to its clients. This opens up a ton of possibilities :^)
This commit is contained in:
Andreas Kling 2019-11-23 16:43:21 +01:00
parent 06ee24263c
commit 630d5b3ffd
13 changed files with 95 additions and 42 deletions

View file

@ -3,7 +3,7 @@
#include <SharedBuffer.h>
AClientConnection::AClientConnection()
: ConnectionNG("/tmp/asportal")
: ConnectionNG(*this, "/tmp/asportal")
{
}
@ -76,3 +76,7 @@ int AClientConnection::get_playing_buffer()
{
return send_sync<AudioServer::GetPlayingBuffer>()->buffer_id();
}
void AClientConnection::handle(const AudioClient::FinishedPlayingBuffer&)
{
}