diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/connectionbase.cpp | 4 | ||||
-rw-r--r-- | common/message.cpp | 4 | ||||
-rw-r--r-- | common/message.h | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/common/connectionbase.cpp b/common/connectionbase.cpp index 66b5140..165614f 100644 --- a/common/connectionbase.cpp +++ b/common/connectionbase.cpp @@ -69,6 +69,10 @@ void ConnectionBase::got_data(uint8_t* data, std::size_t bytes) { case Message::Types::RoundAction: m = make_shared<Message::RoundAction>(); break; + + case Message::Types::RoundEnd: + m = make_shared<Message::RoundEnd>(); + break; default: throw std::runtime_error("Deserialization attempted on unknown message type."); diff --git a/common/message.cpp b/common/message.cpp index 4f7bad3..f3a4748 100644 --- a/common/message.cpp +++ b/common/message.cpp @@ -159,3 +159,7 @@ void Message::RoundAction::serialize(boost::archive::text_oarchive& ar) { void Message::RoundAction::deserialize(boost::archive::text_iarchive& ar) { ar & action; } + +Message::RoundEnd::RoundEnd() : NullBase(Types::RoundEnd) { + +} diff --git a/common/message.h b/common/message.h index 584a850..efcca2e 100644 --- a/common/message.h +++ b/common/message.h @@ -159,6 +159,12 @@ namespace Message { virtual void deserialize(boost::archive::text_iarchive& ar); }; + class RoundEnd : public NullBase { + public: + typedef boost::shared_ptr<RoundEnd> p; + + RoundEnd(); + }; typedef boost::shared_ptr<Base> p; }; |