EndpointOptions

data class EndpointOptions(var preset: Preset? = null, var bindAddr: String? = null, var secretKey: ByteArray? = null, var alpns: List<ByteArray>? = null, var relayMode: RelayMode? = null, var protocols: Map<ByteArray, ProtocolCreator>? = null) : Disposable

Options passed to `Endpoint::bind`.

Constructors

Link copied to clipboard
constructor(preset: Preset? = null, bindAddr: String? = null, secretKey: ByteArray? = null, alpns: List<ByteArray>? = null, relayMode: RelayMode? = null, protocols: Map<ByteArray, ProtocolCreator>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

ALPN protocols advertised on the underlying TLS handshake. Independent of the per-protocol handlers in protocols; useful for client-only setups or for declaring extra ALPNs.

Link copied to clipboard

Override the address the endpoint binds to. Accepts any standard host:port form (IPv4 or IPv6).

Link copied to clipboard

Preset that configures the endpoint builder. Defaults to `preset_n0`. Implement the `Preset` trait in your language for full control.

Link copied to clipboard

Custom protocols to accept on this endpoint, keyed by ALPN. If provided, an internal router is spawned to dispatch incoming connections to the supplied handlers.

Link copied to clipboard

Override which relays the endpoint uses. Defaults to whatever the chosen `Preset` configures.

Link copied to clipboard

Provide a specific secret key, identifying this endpoint. Must be 32 bytes long.

Functions

Link copied to clipboard
open override fun destroy()