6#ifndef KCENON_NETWORK_INTERNAL_INTERFACES_I_QUIC_SERVER_H_
7#define KCENON_NETWORK_INTERNAL_INTERFACES_I_QUIC_SERVER_H_
16#include <system_error>
55 std::vector<uint8_t>&& data,
100 const std::vector<uint8_t>&,
Base interface for all network components.
Interface for QUIC server components.
std::function< void( std::string_view, uint64_t, const std::vector< uint8_t > &, bool)> stream_callback_t
Callback type for stream data (session_id, stream_id, data, is_fin)
virtual auto stop() -> VoidResult=0
Stops the QUIC server.
std::function< void(std::string_view, const std::vector< uint8_t > &)> receive_callback_t
Callback type for default stream data (session_id, data)
virtual auto set_connection_callback(connection_callback_t callback) -> void=0
Sets the callback for new connections.
virtual auto start(uint16_t port) -> VoidResult=0
Starts the QUIC server on the specified port.
virtual auto set_disconnection_callback(disconnection_callback_t callback) -> void=0
Sets the callback for disconnections.
virtual auto connection_count() const -> size_t=0
Gets the number of active QUIC connections.
virtual auto set_error_callback(error_callback_t callback) -> void=0
Sets the callback for errors.
std::function< void(std::string_view, std::error_code)> error_callback_t
Callback type for errors (session_id, error)
virtual auto set_stream_callback(stream_callback_t callback) -> void=0
Sets the callback for stream data.
std::function< void(std::shared_ptr< i_quic_session >)> connection_callback_t
Callback type for new connections.
virtual auto set_receive_callback(receive_callback_t callback) -> void=0
Sets the callback for received data on default stream.
std::function< void(std::string_view)> disconnection_callback_t
Callback type for disconnections (session_id)
Interface for a QUIC session on the server side.
virtual auto send_on_stream(uint64_t stream_id, std::vector< uint8_t > &&data, bool fin=false) -> VoidResult=0
Sends data on a specific stream.
virtual auto close_stream(uint64_t stream_id) -> VoidResult=0
Closes a stream.
virtual auto create_stream() -> Result< uint64_t >=0
Creates a new server-initiated bidirectional stream.
virtual auto create_unidirectional_stream() -> Result< uint64_t >=0
Creates a new server-initiated unidirectional stream.
Interface for a single client session on the server side.
Base interface for all network components.
Session interface representing an active client-server connection.
Network-specific error and result type definitions.