mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00

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 :^)
17 lines
303 B
C++
17 lines
303 B
C++
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <AK/ByteBuffer.h>
|
|
|
|
class IMessage {
|
|
public:
|
|
virtual ~IMessage();
|
|
|
|
virtual int endpoint_magic() const = 0;
|
|
virtual int id() const = 0;
|
|
virtual String name() const = 0;
|
|
virtual ByteBuffer encode() const = 0;
|
|
|
|
protected:
|
|
IMessage();
|
|
};
|