6 #ifndef DDS_ServerChannelImpl_h 7 #define DDS_ServerChannelImpl_h 13 namespace protocol_api
16 class CServerChannelImpl :
public CBaseChannelImpl<T>
21 , m_requiredChannelTypes(_requiredChannelTypes)
24 std::function<bool(SCommandAttachmentImpl<cmdHANDSHAKE>::ptr_t _attachment,
29 bool versionCompatible = m_requiredChannelTypes.empty();
31 if (!versionCompatible)
33 for (
const auto& v : m_requiredChannelTypes)
37 versionCompatible = (*_attachment == versionCmd);
38 if (versionCompatible)
43 if (!versionCompatible)
48 std::string msg(
"Incompatible protocol version of the client");
61 this->
template pushMsg<cmdUNKNOWN>();
65 <<
"] has successfully connected.";
67 this->
template pushMsg<cmdREPLY_HANDSHAKE_OK>();
74 this->
template registerMessageHandler<cmdHANDSHAKE>(funcHandshake);
bool m_isHandshakeOK
Definition: BaseChannelImpl.h:898
EChannelType
Definition: BaseChannelImpl.h:144
Definition: ChannelEventsImpl.h:22
EChannelType m_channelType
Definition: BaseChannelImpl.h:899
std::shared_ptr< SEmptyCmd > ptr_t
Definition: CommandAttachmentImpl.h:65
#define LOG(severity)
Definition: Logger.h:54
Definition: SimpleMsgCmd.h:16
Definition: VersionCmd.h:17
Definition: ChannelEventsImpl.h:21
Definition: dds-agent/src/AgentConnectionManager.h:16
std::string remoteEndIDString()
Definition: BaseChannelImpl.h:667
Definition: BaseChannelImpl.h:180
void onEvent(EChannelEvents _type)
Definition: ChannelEventsImpl.h:50
Definition: BaseChannelImpl.h:42
std::vector< EChannelType > channelTypeVector_t
Definition: BaseChannelImpl.h:151
uint16_t m_channelType
Definition: VersionCmd.h:26
boost::asio::ip::tcp::socket & socket()
Definition: BaseChannelImpl.h:265