aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/debug_receiver/debug_receiver_proto.cpp
blob: 3dcb949a20698ac54a71c834d81a906b805ccab2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "debug_receiver_proto.h"

using namespace NBus;

TDebugReceiverProtocol::TDebugReceiverProtocol()
    : TBusProtocol("debug receiver", 0)
{
}

void TDebugReceiverProtocol::Serialize(const NBus::TBusMessage*, TBuffer&) { 
    Y_FAIL("it is receiver only");
}

TAutoPtr<NBus::TBusMessage> TDebugReceiverProtocol::Deserialize(ui16, TArrayRef<const char> payload) { 
    THolder<TDebugReceiverMessage> r(new TDebugReceiverMessage(ECreateUninitialized()));

    r->Payload.Append(payload.data(), payload.size());

    return r.Release();
}