blob: 84791818090a697a5adb69abe02c7b6eecda7802 (
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;
};
|