4#ifndef _Stroika_Foundation_IO_Network_SocketAddress_h_
5#define _Stroika_Foundation_IO_Network_SocketAddress_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
9#if qStroika_Foundation_Common_Platform_POSIX
10#include <sys/socket.h>
11#elif qStroika_Foundation_Common_Platform_Windows
47 using FamilyType::INET;
48 using FamilyType::INET6;
68#if qStroika_Foundation_Common_Platform_Windows
77 nonvirtual
bool empty ()
const;
83 nonvirtual
void clear ();
115 nonvirtual PortType
GetPort ()
const;
127 template <
typename T>
128 nonvirtual T
As ()
const;
177#include "SocketAddress.inl"
String is like std::u32string, except it is much easier to use, often much more space efficient,...
constexpr SocketAddress() noexcept
nonvirtual PortType GetPort() const
nonvirtual size_t GetRequiredSize() const
nonvirtual InternetAddress GetInternetAddress() const
FamilyType
Socket address family - also sometimes referred to as domain (argument to ::socket calls it domain)
nonvirtual bool empty() const
nonvirtual bool IsInternetAddress() const
nonvirtual String ToString() const
nonvirtual FamilyType GetAddressFamily() const
static constexpr PortType kAnyPort
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
Traversal::Iterable< SocketAddress > SocketAddresses(const Traversal::Iterable< InternetAddress > &internetAddresses, PortType portNumber)
constexpr InternetAddress LocalHost(SocketAddress::FamilyType fm)
return V4::kLocalhost or V6::kLocalhost depending on argument address family