6 #ifndef DDS_ClientChannelImpl_h 7 #define DDS_ClientChannelImpl_h 14 namespace protocol_api
17 class CClientChannelImpl :
public CBaseChannelImpl<T>
20 typedef std::function<void(T*)> handlerEventFunction_t;
28 std::function<bool(SCommandAttachmentImpl<cmdREPLY_HANDSHAKE_OK>::ptr_t _attachment,
37 this->
template pushMsg<cmdUNKNOWN>();
44 this->
template registerMessageHandler<cmdREPLY_HANDSHAKE_OK>(funcHandshakeOK);
47 std::function<bool(SCommandAttachmentImpl<cmdREPLY_HANDSHAKE_ERR>::ptr_t _attachment,
51 LOG(
MiscCommon::info) <<
"Handshake failed with the following error: " << _attachment->m_sMsg;
61 this->
template registerMessageHandler<cmdREPLY_HANDSHAKE_ERR>(funcHandshakeERR);
74 void connect(boost::asio::ip::tcp::resolver::iterator _endpoint_iterator)
76 m_endpoint_iterator = _endpoint_iterator;
77 boost::asio::async_connect(
80 [
this](boost::system::error_code ec, boost::asio::ip::tcp::resolver::iterator) {
93 this->
template pushMsg<cmdHANDSHAKE>(cmd);
105 boost::asio::ip::tcp::resolver::iterator m_endpoint_iterator;
bool m_isHandshakeOK
Definition: BaseChannelImpl.h:898
Definition: ChannelEventsImpl.h:19
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: VersionCmd.h:17
void start()
Definition: BaseChannelImpl.h:246
Definition: ChannelEventsImpl.h:21
Definition: dds-agent/src/AgentConnectionManager.h:16
Definition: BaseChannelImpl.h:180
void onEvent(EChannelEvents _type)
Definition: ChannelEventsImpl.h:50
Definition: BaseChannelImpl.h:40
void reconnect()
Definition: ClientChannelImpl.h:69
uint16_t m_channelType
Definition: VersionCmd.h:26
boost::asio::ip::tcp::socket & socket()
Definition: BaseChannelImpl.h:265
void connect(boost::asio::ip::tcp::resolver::iterator _endpoint_iterator)
Definition: ClientChannelImpl.h:74
Definition: ChannelEventsImpl.h:18