Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
udp.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
12#pragma once
13
25
26#include <memory>
27#include <string>
28#include <string_view>
29
31
59[[nodiscard]] auto create_connection(std::string_view id = "")
60 -> std::unique_ptr<unified::i_connection>;
61
80[[nodiscard]] auto connect(const unified::endpoint_info& endpoint,
81 std::string_view id = "")
82 -> std::unique_ptr<unified::i_connection>;
83
90[[nodiscard]] auto connect(std::string_view url, std::string_view id = "")
91 -> std::unique_ptr<unified::i_connection>;
92
123[[nodiscard]] auto create_listener(std::string_view id = "")
124 -> std::unique_ptr<unified::i_listener>;
125
144[[nodiscard]] auto listen(const unified::endpoint_info& bind_address,
145 std::string_view id = "")
146 -> std::unique_ptr<unified::i_listener>;
147
156[[nodiscard]] auto listen(uint16_t port, std::string_view id = "")
157 -> std::unique_ptr<unified::i_listener>;
158
159} // namespace kcenon::network::protocol::udp
Core interface for active network connections.
Core interface for passive network listeners (server-side).
auto listen(const unified::endpoint_info &bind_address, std::string_view id="") -> std::unique_ptr< unified::i_listener >
Creates and starts a UDP listener in one call.
Definition udp.cpp:62
auto connect(const unified::endpoint_info &endpoint, std::string_view id="") -> std::unique_ptr< unified::i_connection >
Creates and starts a UDP connection in one call.
Definition udp.cpp:39
auto create_listener(std::string_view id="") -> std::unique_ptr< unified::i_listener >
Creates a UDP listener (not yet listening)
Definition udp.cpp:56
auto create_connection(std::string_view id="") -> std::unique_ptr< unified::i_connection >
Creates a UDP connection (not yet started)
Definition udp.cpp:33
Network endpoint information (host/port or URL)
Definition types.h:56
Network endpoint types (host/port, URL) and common type aliases.