18 #include <boost/asio.hpp>
20 #include "hazelcast/client/config/socket_options.h"
21 #include "hazelcast/client/address.h"
23 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
25 #pragma warning(disable : 4251)
30 namespace connection {
36 class ClientInvocation;
43 virtual ~
socket() =
default;
46 const std::shared_ptr<connection::Connection> connection) = 0;
48 virtual void async_write(
49 const std::shared_ptr<connection::Connection> connection,
50 const std::shared_ptr<spi::impl::ClientInvocation> invocation) = 0;
52 virtual void close() = 0;
54 virtual address get_address()
const = 0;
64 virtual const address& get_remote_endpoint()
const = 0;
66 virtual boost::asio::io_context::strand& get_executor() noexcept = 0;
71 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
Represents an address of a client or member in the cluster.
virtual boost::optional< address > local_socket_address() const =0
This function is used to obtain the locally bound endpoint of the socket.