[#D2158D48C656A3B412A7F9AE17EE89DACDE3B0B0]

Function default_port

Return the default port for a known scheme

Synopsis

            std::uint16_t
default_port(scheme s) noexcept;
        

Description

This function returns the default port for the known schemes. If the value does not represent a known scheme or the scheme does not represent a protocol, the function returns zero.

The following ports are returned by the function:

  • scheme::ftp = 21
  • scheme::http , scheme::ws = 80
  • scheme::https , scheme::wss = 443