Type alias WebSocketConfig

WebSocketConfig: {
    ca?: string | string[] | Uint8Array | Uint8Array[];
    cert?: string | string[] | Uint8Array | Uint8Array[];
    keepAliveIntervalTime: number;
    keepAliveTimeoutTime: number;
    key?: string | string[] | Uint8Array | Uint8Array[];
    streamBufferSize: number;
    verifyCallback?: TLSVerifyCallback;
    verifyPeer: boolean;
}

Type declaration

  • Optional ca?: string | string[] | Uint8Array | Uint8Array[]

    Certificate authority certificate in PEM format or Uint8Array buffer containing PEM formatted certificate. Each string or Uint8Array can be one certificate or multiple certificates concatenated together. The order does not matter, each is an independent certificate authority. Multiple concatenated certificate authorities can be passed. They are all concatenated together.

    When this is not set, this defaults to the operating system's CA certificates. OpenSSL (and forks of OpenSSL) all support the environment variables SSL_CERT_DIR and SSL_CERT_FILE.

  • Optional cert?: string | string[] | Uint8Array | Uint8Array[]

    X.509 certificate chain in PEM format or Uint8Array buffer containing PEM formatted certificate chain. Each string or Uint8Array is a certificate chain in subject to issuer order. Multiple certificate chains can be passed. The number of certificate chains must match the number of keys. Each certificate chain must be associated to the corresponding key.

    Currently multiple key and certificate chains is not supported.

  • keepAliveIntervalTime: number

    This controls the interval for keeping alive an idle connection. This time will be used to send a ping frame to keep the connection alive. This is only useful if the maxIdleTimeout is set to greater than 0. This is defaulted to undefined. This is not a quiche option.

  • keepAliveTimeoutTime: number
  • Optional key?: string | string[] | Uint8Array | Uint8Array[]

    Private key as a PEM string or Uint8Array buffer containing PEM formatted key. You can pass multiple keys. The number of keys must match the number of certs. Each key must be associated to the the corresponding cert chain.

    Currently multiple key and certificate chains is not supported.

  • streamBufferSize: number

    Maximum number of bytes for the readable stream

  • Optional verifyCallback?: TLSVerifyCallback

    Custom TLS verification callback. It is expected that the callback will throw an error if the verification fails. Will be ignored if verifyPeer is false.

  • verifyPeer: boolean

    Verify the other peer. Clients by default set this to true. Servers by default set this to false. Servers will not request peer certs unless this is true. Server certs are always sent

Generated using TypeDoc