44 G_EXCEPTION( InvalidFd ,
tx(
"invalid listening file descriptor number") )
75 const std::vector<int> &
fds()
const ;
78 const std::vector<Address> &
fixed()
const ;
81 const std::vector<Address> &
dynamic()
const ;
86 void addWildcards(
unsigned int ) ;
87 static int parseFd(
const std::string & ) ;
88 static bool isAddress(
const std::string & ,
unsigned int ) ;
89 static Address address(
const std::string & ,
unsigned int ) ;
90 static int af(
const std::string & ) ;
91 static std::string basename(
const std::string & ) ;
92 static bool isBad(
const std::string & ) ;
98 std::vector<Address> m_fixed ;
99 std::vector<Address> m_dynamic ;
100 std::vector<int> m_fds ;
The GNet::Address class encapsulates a TCP/UDP transport address.
A class for getting a list of network interfaces and their addresses.
Represents a set of listening inputs which can be file-descriptor, interface or network address.
bool defunct() const
Returns true if no inputs and static.
bool hasEmpties() const
Returns true if some named interfaces have no addresses.
std::string logEmpties() const
Returns a log-line snippet for hasEmpties().
const std::vector< int > & fds() const
Exposes the list of fd inputs.
Listeners(const Interfaces &, const G::StringArray &listener_spec_list, unsigned int port)
Constructor.
bool idle() const
Returns true if no inputs but some interfaces might come up.
bool noUpdates() const
Returns true if some inputs are interfaces but GNet::Interfaces is not active().
const std::vector< Address > & fixed() const
Exposes the list of address inputs.
const std::vector< Address > & dynamic() const
Exposes the list of interface addresses.
std::string badName() const
Returns the first invalid input.
bool hasBad() const
Returns true if one or more inputs are invalid.
std::vector< std::string > StringArray
A std::vector of std::strings.
constexpr const char * tx(const char *p) noexcept
A briefer alternative to G::gettext_noop().