Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
Stroika::Foundation::IO::Network Namespace Reference

Namespaces

namespace  ConnectionlessSocket
 ConnectionlessSocket is typically a UDP socket you use for packet oriented communications (ie not tcp/streams)
 
namespace  ConnectionOrientedMasterSocket
 
namespace  ConnectionOrientedStreamSocket
 ConnectionOrientedStreamSocket is typically a tcp stream, either setup with Connect, or ConnectionOrientedMasterSocket::Accept ()
 
namespace  HTTP
 
namespace  Socket
 
namespace  Transfer
 
namespace  WellKnownPorts
 

Classes

class  CIDR
 
class  DNS
 
struct  Interface
 
class  InternetAddress
 
struct  LinkMonitor
 
class  NeighborsMonitor
 Monitor - either immediately or in the background fetches a list of network neighbors (1 hop away network devices). Also fetches their hardware address (so like 'arp' kind of but may employ other means) More...
 
class  SocketAddress
 
class  SystemInterfacesMgr
 
class  URI
 

Typedefs

using in_addr_t = uint32_t
 

Functions

Traversal::Iterable< InternetAddressInternetAddresses_Any (InternetProtocol::IP::IPVersionSupport ipSupport=InternetProtocol::IP::IPVersionSupport::eDEFAULT)
 
Traversal::Iterable< InternetAddressInternetAddresses_Localhost (InternetProtocol::IP::IPVersionSupport ipSupport=InternetProtocol::IP::IPVersionSupport::eDEFAULT)
 
InternetAddress GetPrimaryInternetAddress ()
 
Traversal::Iterable< SocketAddressSocketAddresses (const Traversal::Iterable< InternetAddress > &internetAddresses, PortType portNumber)
 
constexpr InternetAddress LocalHost (SocketAddress::FamilyType fm)
 return V4::kLocalhost or V6::kLocalhost depending on argument address family
 

Detailed Description

Note
Code-Status: Beta

Typedef Documentation

◆ in_addr_t

v4 ip addr as a long.

Definition at line 69 of file InternetAddress.h.

Function Documentation

◆ InternetAddresses_Any()

Traversal::Iterable< InternetAddress > Stroika::Foundation::IO::Network::InternetAddresses_Any ( InternetProtocol::IP::IPVersionSupport  ipSupport = InternetProtocol::IP::IPVersionSupport::eDEFAULT)

IN_ADDR_ANY This address is a wildcard, matching any address.

Note
Cannot declare here cuz then declaration and definition differ, and cannot define here because we have the constexpr CTOR methods in the .inl file.

namespace V4 { constexpr InternetAddress kAddrAny{in_addr{}}; } namespace V6 { constexpr InternetAddress kAddrAny{in6_addr{}}; } LOCALHOST address this address is for the current machine on its loopback interface.

Note
Cannot declare here cuz then declaration and definition differ, and cannot define here because we have the constexpr CTOR methods in the .inl file.

namespace V4 { constexpr InternetAddress kLocalhost{0x7f, 0x0, 0x0, 0x1}; } namespace V6 { constexpr InternetAddress kLocalhost{in6_addr{{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}}}; } v4 localhost address rendered as v6 (mapped).

Note
Cannot declare here cuz then declaration and definition differ, and cannot define here because we have the constexpr CTOR methods in the .inl file.

namespace V6 { constexpr InternetAddress kV4MappedLocalhost{in6_addr{{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0x7f, 0, 0, 1}}}}; } Return kAddrAny - both the IPv4 and IPv6 variants (depending on ipSupport argument) - which defaults to both.

Definition at line 430 of file InternetAddress.cpp.

◆ InternetAddresses_Localhost()

Traversal::Iterable< InternetAddress > Stroika::Foundation::IO::Network::InternetAddresses_Localhost ( InternetProtocol::IP::IPVersionSupport  ipSupport = InternetProtocol::IP::IPVersionSupport::eDEFAULT)

Return kLocalhost - both the IPv4 and IPv6 variants (depending on ipSupport argument) - which defaults to both.

Definition at line 447 of file InternetAddress.cpp.

◆ GetPrimaryInternetAddress()

InternetAddress Stroika::Foundation::IO::Network::GetPrimaryInternetAddress ( )

add options for filtering out disabled ones (not onlnie) add optikon for fitlering out localhost

HORRIBLY KLUDGY BAD IMPL!!!

Definition at line 135 of file LinkMonitor.cpp.

◆ SocketAddresses()

Traversal::Iterable< SocketAddress > Stroika::Foundation::IO::Network::SocketAddresses ( const Traversal::Iterable< InternetAddress > &  internetAddresses,
PortType  portNumber 
)

Take the argument list of internet addresses and convert them to an equivalent list of SocketAddresses - with the given port.

Example Usage
Listener l{SocketAddresses (InternetAddresses_Any (), usingPortNumber), options.fBindFlags.Value (), ....
Traversal::Iterable< SocketAddress > SocketAddresses(const Traversal::Iterable< InternetAddress > &internetAddresses, PortType portNumber)
Traversal::Iterable< InternetAddress > InternetAddresses_Any(InternetProtocol::IP::IPVersionSupport ipSupport=InternetProtocol::IP::IPVersionSupport::eDEFAULT)

Definition at line 52 of file SocketAddress.cpp.