StormByte-Network 4.0.0
C++26 networking module of the StormByte suite
Loading...
Searching...
No Matches
peer_address.hxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte-Network.
5 *
6 * StormByte-Network original source is dual-licensed:
7 *
8 * 1. GNU Lesser General Public License v3.0 (or later)
9 * You may redistribute and/or modify this file under the terms of the
10 * GNU Lesser General Public License, version 3.0 (or later).
11 *
12 * 2. Commercial license
13 * Alternatively, this file may be used under the terms of a commercial
14 * license agreement with the copyright holder.
15 *
16 * Both licenses apply only to original StormByte-Network source in this
17 * repository. They do not cover other StormByte modules or any third-party
18 * material shipped with this repository (including everything under
19 * thirdparty/, and in particular the bundled StormByte Buffer tree), which
20 * remains under its own license.
21 *
22 * Neither license grants any patent rights. Any patent licenses required
23 * to use this software or third-party components must be obtained separately
24 * from the patent holders.
25 *
26 * StormByte-Network is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 * GNU Lesser General Public License for more details.
30 *
31 * You should have received a copy of the GNU Lesser General Public License
32 * version 3 along with StormByte-Network. If not, see
33 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
34 *
35 * SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-StormByte-Commercial
36 */
37
38#pragma once
39
40#include <StormByte/safe/string.hxx>
41#include <StormByte/type_traits/safe.hxx>
42#include <StormByte/visibility.h>
43
44#include <cstdint>
45
46namespace StormByte::Network {
53 std::uint16_t port{0};
54 };
55}
56
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Buffer::Bridge)
Network module of the StormByte suite.
Numeric IP address and source port of a connected peer.
Definition peer_address.hxx:51
std::uint16_t port
Peer source port in host byte order.
Definition peer_address.hxx:53
Safe::String ip
Numeric IPv4 or IPv6 address.
Definition peer_address.hxx:52
#define STORMBYTE_PUBLIC_TYPE