Home | Libraries | People | FAQ | More |
Set the port.
url_base& set_port( std::uint16_t n);
The port is set to the specified integer.
assert( url( "http://www.example.com" ).set_port( 8080 ).authority().buffer() == "www.example.com:8080" );
this->has_authority() == true && this->has_port() == true && this->port_number() == n
Linear in this->size()
.
Strong guarantee. Calls to allocate may throw.
Name |
Description |
---|---|
|
The port number to set. |
authority = [ userinfo "@" ] host [ ":" port ] port = *DIGIT