Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
authority_view::has_port

Return true if a port is present.

Synopsis
bool
has_port() const;
Description

This function returns true if an authority is present and contains a port.

Example
assert( url_view( "wss://www.example.com:443" ).[link url.ref.boost__urls__authority_view.has_port `has_port`]() );
Complexity

Constant.

Exception Safety

Throws nothing.

BNF
authority   = [ [link url.ref.boost__urls__authority_view.userinfo `userinfo`] "@" ] [link url.ref.boost__urls__authority_view.host `host`] [ ":" [link url.ref.boost__urls__authority_view.port `port`] ]

[link url.ref.boost__urls__authority_view.port `port`]        = *DIGIT
Specification
See Also

encoded_host_and_port, port, port_number.


PrevUpHomeNext