#ifndef INCLUDE_DI_RPC_CLASS_CONNECTION_H_ #define INCLUDE_DI_RPC_CLASS_CONNECTION_H_ #include #include namespace Di { namespace Rpc { class Connection : public Msg { public: struct connectionConnect { std::string peer; }; struct connectionDisconnect { std::string peer; int32_t error = 0; }; std::vector connectionConnectList; std::vector connectionDisconnectlist; explicit Connection(std::shared_ptr msg); private: void __decodeMethodeConnect(std::shared_ptr message); void __decodeMethodeDisconnect(std::shared_ptr message); std::string __getPeer(std::shared_ptr message); int32_t __getError(std::shared_ptr message); }; } // namespace Rpc } // namespace Di #endif // INCLUDE_DI_RPC_CLASS_CONNECTION_H_