A port number you use along with a host to identify a network endpoint.
SDKs
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 6.0+
- Xcode 10.0+
Framework
- Network
Declaration
struct NWEndpoint.Port
A port number you use along with a host to identify a network endpoint.
SDKs
Framework
struct NWEndpoint.Port
init?(String)
Initializes a port with a string.
init?(raw Value: UInt16)
Initializes a port with a raw UInt16 value.
init(integer Literal: NWEndpoint .Port .Integer Literal Type)
Initializes a port with a literal type.
typealias NWEndpoint .Port .Integer Literal Type
A literal type defined for ports.
static let any: NWEndpoint .Port
The unspecified port (port 0).
static let ssh: NWEndpoint .Port
The Secure Shell port (port 22).
static let smtp: NWEndpoint .Port
The Simple Mail Transfer Protocol port (port 25).
static let http: NWEndpoint .Port
The Hypertext Transfer Protocol port (port 80).
static let pop: NWEndpoint .Port
The Post Office Protocol port (port 110).
static let imap: NWEndpoint .Port
The Internet Message Access Protocol port (port 143).
static let https: NWEndpoint .Port
The Secure Hypertext Transfer Protocol port (port 443).
static let imaps: NWEndpoint .Port
The Secure Internet Message Access Protocol port (port 993).
static let socks: NWEndpoint .Port
The SOCKS proxy protocol port (port 1080).
static func != (NWEndpoint .Port, NWEndpoint .Port) -> Bool
Returns a Boolean value indicating whether two values are not equal.
enum NWEndpoint .Host
A name or address that identifies a network endpoint.