14 struct NetworkConnection
20 IPAddressUInt ipAddressUInt_{0u};
21 IPAddress ipAddress_{CVB_LIT(
"0.0.0.0")};
24 NetworkConnection()
noexcept {}
26 NetworkConnection(
const IPAddress &ip,
const Port &port)
33 NetworkConnection(
const IPAddressUInt &ipUInt,
const Port &port)
34 : ipAddressUInt_(ipUInt)
46 static IPAddress
ToIPAddress(
const IPAddressUInt &ipAddressInt)
49 bytes[3] = ipAddressInt & 0xFF;
50 bytes[2] = (ipAddressInt >> 8) & 0xFF;
51 bytes[1] = (ipAddressInt >> 16) & 0xFF;
52 bytes[0] = (ipAddressInt >> 24) & 0xFF;
59 return IPAddress(str.begin(), str.end());
46 static IPAddress
ToIPAddress(
const IPAddressUInt &ipAddressInt) {
…}
71 const char *runner = _ip.c_str();
72 unsigned long factor = 1;
73 IPAddressUInt temp = 0;
74 unsigned int reset = 0;
79 while ((_ip.c_str() - runner--))
87 temp += (factor *
static_cast<unsigned long>(*(runner) -
'0') * (reset == 1 ? 10 : (reset == 2 ? 100 : 1)));
14 struct NetworkConnection {
…};
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
std::string String
String for wide characters or unicode characters.
Definition string.hpp:49
static IPAddress ToIPAddress(const IPAddressUInt &ipAddressInt)
Creates an IPAddress from the given uint ip .
Definition network_connection.hpp:46
static IPAddressUInt ToIPAddressUInt(const IPAddress &ip)
Creates an uint ip . from the given IPAddress
Definition network_connection.hpp:68