mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-15 16:48:24 +03:00
630d5b3ffd
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 :^)
26 lines
360 B
C++
26 lines
360 B
C++
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <AK/OwnPtr.h>
|
|
|
|
namespace AK {
|
|
class BufferStream;
|
|
}
|
|
|
|
class IMessage;
|
|
|
|
class IEndpoint {
|
|
public:
|
|
virtual ~IEndpoint();
|
|
|
|
virtual int magic() const = 0;
|
|
virtual String name() const = 0;
|
|
virtual OwnPtr<IMessage> handle(const IMessage&) = 0;
|
|
|
|
protected:
|
|
IEndpoint();
|
|
|
|
private:
|
|
String m_name;
|
|
};
|