xtd 0.2.0
Loading...
Searching...
No Matches

◆ port()

int32 xtd::uri::port ( ) const

Gets the port number of this URI.

Returns
int32 An int32 value that contains the port number for this URI.
Exceptions
xtd::invalid_operation_exceptionThis instance represents a relative URI, and this property is valid only for absolute URIs.
Remarks
The port number defines the protocol port used for contacting the server referenced in the URI. If a port is not specified as part of the URI, the port property returns the default value for the protocol. If there is no default port number, this property returns -1.