StormByte C++ Library: Network module
0.0.9999
StormByte-Network is a StormByte library module for handling and create network connections
Loading...
Searching...
No Matches
lib
public
StormByte
network
connection
protocol.hxx
1
#pragma once
2
3
#include <StormByte/network/visibility.h>
4
5
#include <string>
6
11
namespace
StormByte::Network::Connection {
16
enum class
STORMBYTE_NETWORK_PUBLIC Protocol:
int
{
17
IPv4,
18
IPv6,
19
};
20
26
constexpr
STORMBYTE_NETWORK_PUBLIC std::string ToString(
const
Protocol& protocol)
noexcept
{
27
switch
(protocol) {
28
case
Protocol::IPv4:
29
return
"IPv4"
;
30
case
Protocol::IPv6:
31
return
"IPv6"
;
32
default
:
33
return
"Unknown"
;
34
}
35
}
36
}
Generated by
1.9.8