blob: b61c4f4ae6efc0cd704b943b3dcd623494215490 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include <library/cpp/messagebus/ybus.h>
struct TSimpleMessage: public NBus::TBusMessage {
ui32 Payload;
TSimpleMessage()
: TBusMessage(1)
, Payload(0)
{
}
TSimpleMessage(NBus::ECreateUninitialized)
: TBusMessage(NBus::ECreateUninitialized())
{
}
};
struct TSimpleProtocol: public NBus::TBusProtocol {
TSimpleProtocol()
: NBus::TBusProtocol("simple", 55666)
{
}
void Serialize(const NBus::TBusMessage* mess, TBuffer& data) override;
TAutoPtr<NBus::TBusMessage> Deserialize(ui16 ty, TArrayRef<const char> payload) override;
};
|