17 #ifndef DEFAULTOPERATIONLONGPOLLCHANNEL_HPP_
18 #define DEFAULTOPERATIONLONGPOLLCHANNEL_HPP_
25 #include <boost/asio.hpp>
49 virtual const std::string&
getId()
const {
return CHANNEL_ID; }
64 return SUPPORTED_TYPES;
80 return "/EP/LongSync";
91 static const std::string CHANNEL_ID;
92 static const std::map<TransportType, ChannelDirection> SUPPORTED_TYPES;
96 boost::asio::io_service io_;
97 boost::asio::io_service::work work_;
98 std::thread pollThread_;
102 bool connectionInProgress_;
108 std::shared_ptr<IPTransportInfo> currentServer_;
111 KAA_CONDITION_VARIABLE_DECLARE(waitCondition_);
112 KAA_MUTEX_DECLARE(conditionMutex_);
113 KAA_MUTEX_DECLARE(channelGuard_);
std::shared_ptr< IConnectivityChecker > ConnectivityCheckerPtr
virtual const std::map< TransportType, ChannelDirection > & getSupportedTransportTypes() const
std::shared_ptr< IFailoverStrategy > IFailoverStrategyPtr
virtual void setDemultiplexer(IKaaDataDemultiplexer *demultiplexer)
virtual ~DefaultOperationLongPollChannel()
static const TransportProtocolId HTTP_TRANSPORT_ID
virtual const std::string & getId() const
virtual TransportProtocolId getTransportProtocolId() const
IKaaClientContext & context_
virtual void setConnectivityChecker(ConnectivityCheckerPtr checker)
virtual void setFailoverStrategy(IFailoverStrategyPtr strategy)
virtual ServerType getServerType() const
virtual ITransportConnectionInfoPtr getServer()
virtual void setServer(ITransportConnectionInfoPtr server)
DefaultOperationLongPollChannel(IKaaChannelManager &channelManager, const KeyPair &clientKeys, IKaaClientContext &context)
virtual void sync(TransportType type)
virtual void setMultiplexer(IKaaDataMultiplexer *multiplexer)
std::string getURLSuffix()
virtual void syncAck(TransportType type)
std::shared_ptr< ITransportConnectionInfo > ITransportConnectionInfoPtr