Url.port

The port. * This is inferred from the scheme if it isn't present in the Url itself. If the scheme is not known and the port is not present, the port will be given as 0. For some schemes, port will not be sensible -- for instance, file or chrome-extension.

If you explicitly need to detect whether the user provided a port, check the providedPort field.

  1. ushort port [@property getter]
    struct Url
    pure @property const nothrow
    ushort
    port
    ()
  2. ushort port [@property setter]

Meta