@@ -178,6 +178,17 @@ Shared state object with properties:
178178* ` sessionCount ` {number}
179179* ` busy ` {boolean}
180180
181+ ### ` endpoint.stats `
182+
183+ <!-- YAML
184+ added: REPLACEME
185+ -->
186+
187+ * Type: {DTLSEndpoint.Stats}
188+
189+ The statistics collected for this endpoint. Read only. The stats object is
190+ live and updated by the C++ internals as data flows through the endpoint.
191+
181192### ` endpoint.busy `
182193
183194* {boolean}
@@ -204,6 +215,99 @@ Immediately destroys the endpoint without sending `close_notify` alerts.
204215
205216Equivalent to calling ` endpoint.close() ` .
206217
218+ ## Class: ` DTLSEndpoint.Stats `
219+
220+ <!-- YAML
221+ added: REPLACEME
222+ -->
223+
224+ A view of the collected statistics for an endpoint.
225+
226+ ### ` endpointStats.createdAt `
227+
228+ <!-- YAML
229+ added: REPLACEME
230+ -->
231+
232+ * Type: {bigint} A timestamp indicating when the endpoint was created. Read only.
233+
234+ ### ` endpointStats.destroyedAt `
235+
236+ <!-- YAML
237+ added: REPLACEME
238+ -->
239+
240+ * Type: {bigint} A timestamp indicating when the endpoint was destroyed. Read only.
241+
242+ ### ` endpointStats.bytesReceived `
243+
244+ <!-- YAML
245+ added: REPLACEME
246+ -->
247+
248+ * Type: {bigint} The total number of bytes received by this endpoint. Read only.
249+
250+ ### ` endpointStats.bytesSent `
251+
252+ <!-- YAML
253+ added: REPLACEME
254+ -->
255+
256+ * Type: {bigint} The total number of bytes sent by this endpoint. Read only.
257+
258+ ### ` endpointStats.packetsReceived `
259+
260+ <!-- YAML
261+ added: REPLACEME
262+ -->
263+
264+ * Type: {bigint} The total number of UDP packets received by this endpoint. Read only.
265+
266+ ### ` endpointStats.packetsSent `
267+
268+ <!-- YAML
269+ added: REPLACEME
270+ -->
271+
272+ * Type: {bigint} The total number of UDP packets sent by this endpoint. Read only.
273+
274+ ### ` endpointStats.serverSessions `
275+
276+ <!-- YAML
277+ added: REPLACEME
278+ -->
279+
280+ * Type: {bigint} The total number of peer-initiated sessions accepted by this
281+ endpoint. Read only.
282+
283+ ### ` endpointStats.clientSessions `
284+
285+ <!-- YAML
286+ added: REPLACEME
287+ -->
288+
289+ * Type: {bigint} The total number of sessions initiated by this endpoint. Read only.
290+
291+ ### ` endpointStats.serverBusyCount `
292+
293+ <!-- YAML
294+ added: REPLACEME
295+ -->
296+
297+ * Type: {bigint} The total number of incoming connections rejected because the
298+ endpoint was marked busy. Read only.
299+
300+ ### ` endpointStats.isConnected `
301+
302+ <!-- YAML
303+ added: REPLACEME
304+ -->
305+
306+ * Type: {boolean}
307+
308+ ` true ` if the stats object is still connected to the underlying endpoint.
309+ Once the endpoint is destroyed, the stats become a stale snapshot.
310+
207311## Class: ` DTLSSession `
208312
209313<!-- YAML
@@ -264,6 +368,17 @@ Immediately destroys the session without sending `close_notify`.
264368
265369* Returns: {string|undefined} The negotiated SRTP protection profile name.
266370
371+ ### ` session.stats `
372+
373+ <!-- YAML
374+ added: REPLACEME
375+ -->
376+
377+ * Type: {DTLSSession.Stats}
378+
379+ The statistics collected for this session. Read only. The stats object is
380+ live and updated as data flows through the session.
381+
267382### ` session.exportKeyingMaterial(length, label[, context]) `
268383
269384* ` length ` {number} Number of bytes to export.
@@ -275,6 +390,97 @@ Exports keying material from the DTLS session, as defined in
275390[ RFC 5705] [ ] . This is commonly used with DTLS-SRTP to derive
276391encryption keys for media streams.
277392
393+ ## Class: ` DTLSSession.Stats `
394+
395+ <!-- YAML
396+ added: REPLACEME
397+ -->
398+
399+ A view of the collected statistics for a session.
400+
401+ ### ` sessionStats.createdAt `
402+
403+ <!-- YAML
404+ added: REPLACEME
405+ -->
406+
407+ * Type: {bigint} A timestamp indicating when the session was created. Read only.
408+
409+ ### ` sessionStats.destroyedAt `
410+
411+ <!-- YAML
412+ added: REPLACEME
413+ -->
414+
415+ * Type: {bigint} A timestamp indicating when the session was destroyed. Read only.
416+
417+ ### ` sessionStats.closingAt `
418+
419+ <!-- YAML
420+ added: REPLACEME
421+ -->
422+
423+ * Type: {bigint} A timestamp indicating when ` close() ` was called. Read only.
424+
425+ ### ` sessionStats.handshakeCompletedAt `
426+
427+ <!-- YAML
428+ added: REPLACEME
429+ -->
430+
431+ * Type: {bigint} A timestamp indicating when the DTLS handshake completed. Read only.
432+
433+ ### ` sessionStats.bytesReceived `
434+
435+ <!-- YAML
436+ added: REPLACEME
437+ -->
438+
439+ * Type: {bigint} The total number of application data bytes received. Read only.
440+
441+ ### ` sessionStats.bytesSent `
442+
443+ <!-- YAML
444+ added: REPLACEME
445+ -->
446+
447+ * Type: {bigint} The total number of application data bytes sent. Read only.
448+
449+ ### ` sessionStats.messagesReceived `
450+
451+ <!-- YAML
452+ added: REPLACEME
453+ -->
454+
455+ * Type: {bigint} The total number of application messages received. Read only.
456+
457+ ### ` sessionStats.messagesSent `
458+
459+ <!-- YAML
460+ added: REPLACEME
461+ -->
462+
463+ * Type: {bigint} The total number of application messages sent. Read only.
464+
465+ ### ` sessionStats.retransmitCount `
466+
467+ <!-- YAML
468+ added: REPLACEME
469+ -->
470+
471+ * Type: {bigint} The total number of DTLS handshake retransmissions. Read only.
472+
473+ ### ` sessionStats.isConnected `
474+
475+ <!-- YAML
476+ added: REPLACEME
477+ -->
478+
479+ * Type: {boolean}
480+
481+ ` true ` if the stats object is still connected to the underlying session.
482+ Once the session is destroyed, the stats become a stale snapshot.
483+
278484### Callback properties
279485
280486#### ` session.onmessage `
0 commit comments