void setName(const std::string& newName)
{
name = newName;
- if (newName.empty()) {
- nameWithAddr = newName.empty() ? remote.toStringWithPort() : (name + " (" + remote.toStringWithPort()+ ")");
- }
+ nameWithAddr = newName.empty() ? remote.toStringWithPort() : (name + " (" + remote.toStringWithPort()+ ")");
}
string getStatus() const
.. function:: setServerPolicyLua(name, function)
- Set server selection policy to one named `name`` and provided by ``function``.
+ Set server selection policy to one named ``name`` and provided by ``function``.
:param string name: name for this policy
:param string function: name of the function
.. versionadded:: 1.5.0
- Set server selection policy to one named `name`` and provided by the FFI function ``function``.
+ Set server selection policy to one named ``name`` and provided by the FFI function ``function``.
:param string name: name for this policy
:param string function: name of the FFI function
* :class:`Server`: generated with :func:`newServer`, represents a downstream server
* :class:`ComboAddress`: represents an IP address and port
* :class:`DNSName`: represents a domain name
-* :class:`Netmask`: represents a Netmask
+* :class:`Netmask`: represents a netmask
* :class:`NetmaskGroup`: represents a group of netmasks
* :class:`QPSLimiter`: implements a QPS-based filter
* :class:`SuffixMatchNode`: represents a group of domain suffixes for rapid testing of membership
Return a :class:`ComboAddress` object representing the base network of this netmask object after masking any additional bits if necessary (for example ``192.0.2.0`` if the netmask was constructed with ``newNetmask('192.0.2.1/24')).
- .. method:: Netmask:isEmpty() -> bool
+ .. method:: Netmask:empty() -> bool
Return true if the netmask is empty, meaning that the netmask has not been set to a proper value.