Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DtlsSocket

Hierarchy

  • EventEmitter
    • DtlsSocket

Index

Methods

_connect

  • _connect(port: number, ip: string): Promise<void>

close

  • close(): Promise<void>

connect

  • connect(port: number, ip: string): Promise<void>

emit

  • emit(event: "message", data: Buffer): any
  • emit(event: "ready"): any

flushQueuedApplicationData

  • flushQueuedApplicationData(): void

handleRecv

off

  • off(event: "message", listener: (data: Buffer) => any): any
  • off(event: "ready", listener: (data: Buffer) => any): any
  • Parameters

    • event: "message"
    • listener: (data: Buffer) => any
        • (data: Buffer): any
        • Parameters

          • data: Buffer

          Returns any

    Returns any

  • Parameters

    • event: "ready"
    • listener: (data: Buffer) => any
        • (data: Buffer): any
        • Parameters

          • data: Buffer

          Returns any

    Returns any

on

  • on(event: "message", listener: (data: Buffer) => any): any
  • on(event: "ready", listener: (data: Buffer) => any): any
  • Parameters

    • event: "message"
    • listener: (data: Buffer) => any
        • (data: Buffer): any
        • Parameters

          • data: Buffer

          Returns any

    Returns any

  • Parameters

    • event: "ready"
    • listener: (data: Buffer) => any
        • (data: Buffer): any
        • Parameters

          • data: Buffer

          Returns any

    Returns any

once

  • once(event: "message", listener: (data: Buffer) => any): any
  • once(event: "ready", listener: (data: Buffer) => any): any
  • Parameters

    • event: "message"
    • listener: (data: Buffer) => any
        • (data: Buffer): any
        • Parameters

          • data: Buffer

          Returns any

    Returns any

  • Parameters

    • event: "ready"
    • listener: (data: Buffer) => any
        • (data: Buffer): any
        • Parameters

          • data: Buffer

          Returns any

    Returns any

resendPacketsIfNeeded

  • resendPacketsIfNeeded(): void

resetConnectionState

  • resetConnectionState(): void

send

  • send(bytes: Buffer, cb?: (err: null | Error, bytesWritten: number) => void): void
  • Parameters

    • bytes: Buffer
    • Optional cb: (err: null | Error, bytesWritten: number) => void
        • (err: null | Error, bytesWritten: number): void
        • Parameters

          • err: null | Error
          • bytesWritten: number

          Returns void

    Returns void

sendClientHello

  • sendClientHello(): void

sendClientKeyExchangeFlight

  • sendClientKeyExchangeFlight(isRetrasmit: boolean): void

setValidServerCertificates

  • setValidServerCertificates(certificates: Certificate[]): void

Constructors

constructor

Properties

currentEpoch

currentEpoch: CurrentEpoch

epoch

epoch: number

handshakeResendTimeout

handshakeResendTimeout: number = 200

nextEpoch

nextEpoch: NextEpoch

queuedApplicationData

queuedApplicationData: Buffer[]

serverCertificates

serverCertificates: Certificate[]

Optional socket

socket: Socket

state

state: HandshakeState

Generated using TypeDoc