Class ClientSessionV1

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

  • public ecal_service::ClientSessionBase (Class ClientSessionBase)

  • public std::enable_shared_from_this< ClientSessionV1 >

Class Documentation

class ClientSessionV1 : public ecal_service::ClientSessionBase, public std::enable_shared_from_this<ClientSessionV1>

Public Functions

ClientSessionV1(const ClientSessionV1&) = delete
ClientSessionV1(ClientSessionV1&&) = delete
ClientSessionV1 &operator=(const ClientSessionV1&) = delete
ClientSessionV1 &operator=(ClientSessionV1&&) = delete
~ClientSessionV1() override
virtual bool async_call_service(const std::shared_ptr<const std::string> &request, const ResponseCallbackT &response_callback) override
virtual std::string get_host() const override
virtual std::uint16_t get_port() const override
virtual asio::ip::tcp::endpoint get_remote_endpoint() const override
virtual State get_state() const override
virtual std::uint8_t get_accepted_protocol_version() const override
virtual int get_queue_size() const override
void peek_for_error()
void handle_connection_loss_error(const std::string &message)
void call_all_callbacks_with_error()
virtual void stop() override

Stop the client.

This will close the connection AND set the state to stopped. This means, that no further async service calls will be accepted. From now on, all async service calls will just return false and the callback will not be called any more in order to give the io_thread the chance of shutting down.

Public Static Functions

static std::shared_ptr<ClientSessionV1> create(const std::shared_ptr<asio::io_context> &io_context, const std::vector<std::pair<std::string, std::uint16_t>> &server_list, const EventCallbackT &event_callback, const LoggerT &logger_ = default_logger("Service Client V1"))

Protected Functions

ClientSessionV1(const std::shared_ptr<asio::io_context> &io_context, const std::vector<std::pair<std::string, std::uint16_t>> &server_list, const EventCallbackT &event_callback, const LoggerT &logger)