NPRPC docs

protocol RpcBuilderProtocol

Swift

protocol RpcBuilderProtocol

Base protocol for all RPC builders providing common configuration

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:77

Methods

@discardableResult func allowAnonymousTelemetry(_ allowed: Bool) -> Self

Let any QUIC peer holding the reference read telemetry. Without this, enableTelemetry requires requireClientCertificates.

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:84

@discardableResult func allowAnonymousTelemetry() -> Self

Not documented.

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:135

func build() throws -> Rpc

Build and initialize the Rpc instance

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:120

@discardableResult func disableSslClientVerification() -> Self

Disable SSL certificate verification for client connections

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:108

@discardableResult func enableSslClientSelfSignedCert(_ certPath: String) -> Self

Enable client to accept self-signed server certificates

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:104

@discardableResult func enableTelemetry(_ enabled: Bool, minIntervalMs: UInt32) -> Self

Enable the built-in QUIC telemetry service (requires withQuic).

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:80

@discardableResult func enableTelemetry(minIntervalMs: UInt32 = 250) -> Self

Not documented.

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:130

@discardableResult func enableTelemetry(_ enabled: Bool) -> Self

Not documented.

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:140

@discardableResult func quicClientTls(caFile: String, certFile: String, keyFile: String) -> Self

TLS trust and optional identity for outbound QUIC connections.

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:92

@discardableResult func quicClientTls(caFile: String) -> Self

Not documented.

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:125

@discardableResult func setLogLevel(_ level: LogLevel) -> Self

Set log level (uses LogLevel from Generated/nprpc.swift)

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:96

@discardableResult func telemetryRouterStatsFile(_ path: String) -> Self

Add npquicrouter's stats file to each telemetry snapshot, so a monitor can read the router through this server.

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:88

@discardableResult func withHostname(_ hostname: String) -> Self

Set hostname for advertised URLs

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:100

func withHttp(_ port: UInt16) -> RpcBuilderHttp

Add HTTP/WebSocket transport on specified port

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:114

func withQuic(_ port: UInt16) -> RpcBuilderQuic

Add QUIC transport on specified port

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:117

func withTcp(_ port: UInt16) -> RpcBuilderTcp

Add TCP transport on specified port

nprpc_swift/Sources/NPRPC/RpcBuilder.swift:111