boost::urls::authority_view::port

Return the port

Synopsis

Declared in <include/boost/url/authority_view.hpp>

core::string_view
port() const noexcept;

Description

If present, this function returns a string representing the port (which may be empty). Otherwise it returns an empty string.

assert( url_view( "http://localhost.com:8080" ).port() == "8080" );

Constant.

Throws nothing.

port = *DIGIT
  • 3.2.3. Port (rfc3986)
  • See Also

    encoded_host_and_port , has_port , port_number .

    Created with MrDocs