arti::cfg

Macro resolve_listen_port

Source
macro_rules! resolve_listen_port {
    { $self:expr, $field:ident, $def_port:expr } => { ... };
}
👎Deprecated: This macro is only for supporting old _port options! Don’t use it for new options.
Expand description

Resolves values from $field_listen and $field_port (compat) into a Listen

For dns and proxy.

Handles defaulting, and normalization, using resolve_alternative_specs and Listen::new_localhost_option.

Broken out into a macro so as to avoid having to state the field name four times, which is a recipe for programming slips.

NOTE: Don’t use this for new ports options! We only have to use it where we do because of the legacy port options. For new ports, provide a listener only.