mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28: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:
parent
06ee24263c
commit
630d5b3ffd
13 changed files with 95 additions and 42 deletions
|
@ -1,10 +1,9 @@
|
|||
#include "ASClientConnection.h"
|
||||
#include "ASMixer.h"
|
||||
|
||||
#include "AudioClientEndpoint.h"
|
||||
#include <LibAudio/ABuffer.h>
|
||||
#include <LibCore/CEventLoop.h>
|
||||
#include <SharedBuffer.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -30,10 +29,9 @@ void ASClientConnection::die()
|
|||
s_connections.remove(client_id());
|
||||
}
|
||||
|
||||
void ASClientConnection::did_finish_playing_buffer(Badge<ASMixer>, int buffer_id)
|
||||
void ASClientConnection::did_finish_playing_buffer(Badge<ASBufferQueue>, int buffer_id)
|
||||
{
|
||||
(void)buffer_id;
|
||||
//post_message(AudioClient::FinishedPlayingBuffer(buffer_id));
|
||||
post_message(AudioClient::FinishedPlayingBuffer(buffer_id));
|
||||
}
|
||||
|
||||
OwnPtr<AudioServer::GreetResponse> ASClientConnection::handle(const AudioServer::Greet& message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue