struct EndPoint
Swift
struct EndPoint
Network endpoint identifying a remote NPRPC object
nprpc_swift/Sources/NPRPC/EndPoint.swift:59
Constructors
init(type: TransportType, hostname: String, port: UInt16, path: String = "")
Create an endpoint with explicit parameters
nprpc_swift/Sources/NPRPC/EndPoint.swift:70
Properties
var description: String { get }
The endpoint as a URL; see toURL().
nprpc_swift/Sources/NPRPC/EndPoint.swift:133
let hostname: String
Host name or IP address; the channel UUID for shared memory.
nprpc_swift/Sources/NPRPC/EndPoint.swift:63
let path: String
URL path for HTTP and WebSocket endpoints; empty otherwise.
nprpc_swift/Sources/NPRPC/EndPoint.swift:67
let port: UInt16
Port; 0 for shared memory.
nprpc_swift/Sources/NPRPC/EndPoint.swift:65
let type: TransportType
The transport.
nprpc_swift/Sources/NPRPC/EndPoint.swift:61
Methods
func hash(into hasher: inout Hasher)
Hashes the fields == compares.
nprpc_swift/Sources/NPRPC/EndPoint.swift:152
static func http(host: String, port: UInt16, path: String = "/nprpc") -> EndPoint
An RPC-over-HTTP endpoint.
nprpc_swift/Sources/NPRPC/EndPoint.swift:115
static func parse(_ url: String) throws -> EndPoint
Parse endpoint from URL string
url- URL in format "scheme://host:port/path"
Returns Parsed endpoint, or nil if invalid
nprpc_swift/Sources/NPRPC/EndPoint.swift:80
static func quic(host: String, port: UInt16) -> EndPoint
A native QUIC endpoint.
nprpc_swift/Sources/NPRPC/EndPoint.swift:120
static func tcp(host: String, port: UInt16) -> EndPoint
A native TCP endpoint.
nprpc_swift/Sources/NPRPC/EndPoint.swift:105
func toURL() -> String
Convert endpoint to URL string
nprpc_swift/Sources/NPRPC/EndPoint.swift:95
static func webSocket(host: String, port: UInt16, path: String = "/nprpc") -> EndPoint
A WebSocket endpoint.
nprpc_swift/Sources/NPRPC/EndPoint.swift:110
Operators
static func == (lhs: EndPoint, rhs: EndPoint) -> Bool
Same transport, host, port and path.
nprpc_swift/Sources/NPRPC/EndPoint.swift:141