Set the port
The port is set to the specified integer.
assert( url( "http://www.example.com" ).set_port_number( 8080 ).authority().buffer() == "www.example.com:8080" );
this->has_authority() == true && this->has_port() == true && this->port_number() == n
Calls to allocate may throw.
authority = [ userinfo "@" ] host [ ":" port ]
port = *DIGIT
Name | Description |
---|---|
n | The port number to set. |
remove_port , set_port .