On this page

C

DTLSEndpoint

History

Manages a UDP socket and multiplexes DTLS sessions.

Returns:Object
{ address, family, port }

The local address the endpoint is bound to.

Returns:DTLSEndpointState

Shared state object with properties:

Attributes
bound:boolean
listening:boolean
closing:boolean
destroyed:boolean
sessionCount:number
busy:boolean
P

endpoint.stats

History

The statistics collected for this endpoint. Read only. The stats object is live and updated by the C++ internals as data flows through the endpoint.

Attributes

When true, the endpoint rejects new incoming connections. Can be set to implement backpressure.

endpoint.close(): Promise
Returns:Promise
Resolves when the endpoint is fully closed.

Gracefully closes the endpoint. All active sessions are closed with close_notify alerts before the UDP socket is released.

endpoint.destroy(error?): void

Immediately destroys the endpoint without sending close_notify alerts.

Attributes
Resolves when the endpoint has fully closed.
endpoint[Symbol.asyncDispose](): void

Equivalent to calling endpoint.close().