diff options
Diffstat (limited to 'fnet/src/examples/ping/packets.h')
-rw-r--r-- | fnet/src/examples/ping/packets.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fnet/src/examples/ping/packets.h b/fnet/src/examples/ping/packets.h index 27a06bdaab3..68cc27ccb5b 100644 --- a/fnet/src/examples/ping/packets.h +++ b/fnet/src/examples/ping/packets.h @@ -1,36 +1,36 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/fnet/packet.h> -#include <vespa/fnet/ipacketfactory.h> enum { PCODE_PING_REQUEST = 1, PCODE_PING_REPLY = 2 }; + class PingRequest : public FNET_Packet { public: - uint32_t GetPCODE() override; - uint32_t GetLength() override; - void Encode(FNET_DataBuffer *) override; - bool Decode(FNET_DataBuffer *src, uint32_t len) override; + virtual uint32_t GetPCODE() override; + virtual uint32_t GetLength() override; + virtual void Encode(FNET_DataBuffer *) override; + virtual bool Decode(FNET_DataBuffer *src, uint32_t len) override; }; + class PingReply : public FNET_Packet { public: - uint32_t GetPCODE() override; - uint32_t GetLength() override; - void Encode(FNET_DataBuffer *) override; - bool Decode(FNET_DataBuffer *src, uint32_t len) override; + virtual uint32_t GetPCODE() override; + virtual uint32_t GetLength() override; + virtual void Encode(FNET_DataBuffer *) override; + virtual bool Decode(FNET_DataBuffer *src, uint32_t len) override; }; class PingPacketFactory : public FNET_IPacketFactory { public: - FNET_Packet *CreatePacket(uint32_t pcode, FNET_Context) override; + virtual FNET_Packet *CreatePacket(uint32_t pcode, FNET_Context) override; }; |