Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

default_port

Return the default port for a known scheme.

Synopsis

Defined in header <boost/url/scheme.hpp>

std::uint16_t
default_port(
    scheme s);
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:

Return Value

An integer with the default port number

Parameters

Name

Description

s

The known scheme constant

Convenience header <boost/url.hpp>


PrevUpHomeNext