61 [[nodiscard]]
auto send(std::span<const std::byte> data) ->
VoidResult override;
62 [[nodiscard]]
auto send(std::vector<uint8_t>&& data) ->
VoidResult override;
63 [[nodiscard]]
auto is_connected() const noexcept ->
bool override;
64 [[nodiscard]] auto
id() const noexcept -> std::string_view override;
74 auto
close() noexcept ->
void override;
77 auto
set_timeout(std::chrono::milliseconds timeout) ->
void override;
78 [[nodiscard]] auto
is_connecting() const noexcept ->
bool override;
88 std::shared_ptr<core::messaging_udp_client>
client_;
Adapter that wraps messaging_udp_client to implement i_connection.
std::mutex callbacks_mutex_
auto send(std::span< const std::byte > data) -> VoidResult override
Sends raw data to the remote endpoint.
connection_options options_
udp_connection_adapter & operator=(const udp_connection_adapter &)=delete
endpoint_info local_endpoint_
std::atomic< bool > is_connecting_
auto is_connected() const noexcept -> bool override
Checks if the transport is currently connected.
auto local_endpoint() const noexcept -> endpoint_info override
Gets the local endpoint information.
auto set_callbacks(connection_callbacks callbacks) -> void override
Sets all connection callbacks at once.
endpoint_info remote_endpoint_
auto connect(const endpoint_info &endpoint) -> VoidResult override
Connects to a remote endpoint using host/port.
auto set_options(connection_options options) -> void override
Sets connection options.
auto setup_internal_callbacks() -> void
Sets up internal callbacks to bridge to unified callbacks.
auto set_timeout(std::chrono::milliseconds timeout) -> void override
Sets the connection timeout.
udp_connection_adapter(std::string_view connection_id)
Constructs an adapter with a unique connection ID.
std::string connection_id_
auto close() noexcept -> void override
Closes the connection gracefully.
connection_callbacks callbacks_
std::mutex endpoint_mutex_
auto wait_for_stop() -> void override
Blocks until the component has stopped.
std::shared_ptr< core::messaging_udp_client > client_
auto remote_endpoint() const noexcept -> endpoint_info override
Gets the remote endpoint information.
udp_connection_adapter & operator=(udp_connection_adapter &&)=delete
auto is_connecting() const noexcept -> bool override
Checks if the connection is in the process of connecting.
udp_connection_adapter(udp_connection_adapter &&)=delete
~udp_connection_adapter() override
Destructor ensures proper cleanup.
udp_connection_adapter(const udp_connection_adapter &)=delete
Core interface for active network connections.
Core interface for active network connections.
Callback functions for connection events.
Configuration options for connections.
Network endpoint information (host/port or URL)