Class Https

Class representing the HTTPS server

Hierarchy

  • Https

Constructors

  • Creates a new instance of the HTTPS server

    Returns Https

Properties

errorLog: FixedSizeArray<Error> = ...
requestLog: FixedSizeArray<OutgoingHttpHeaders> = ...
server: undefined | Server<typeof IncomingMessage, typeof ServerResponse>

The HTTPS server

wssPaths: Map<null | string, WebSockets> = ...

Methods

  • Adds a new WebSocket server for a specific path

    Parameters

    • webSockets: WebSockets

      The WebSockets instance to add

    • path: string

      The path for which the WebSockets instance will be added

    Returns void

  • Handles incoming requests from listening server

    Parameters

    • error: Error

    Returns void

  • Handles incoming requests from listening server

    Parameters

    • request: IncomingMessage
    • response: ServerResponse<IncomingMessage>

    Returns void

  • Handles incoming Wss Upgrade requests from listening server

    Parameters

    • request: IncomingMessage
    • socket: Socket
    • head: Buffer

    Returns void

  • Returns a boolean indicating whether the required files for the HTTPS server are ready

    Returns

    True

    Returns Promise<boolean>

  • Sends content in the response.

    Parameters

    • response: ServerResponse<IncomingMessage>

      The response to send the content to.

    • contentType: string

      The type of content being sent (e.g. "text/html").

    • contentData: string

      The data of the content being sent.

    Returns void

  • Starts the HTTPS server

    Throws

    If an error occurs while starting the server

    Returns Promise<void>

  • Stops the HTTPS server

    Throws

    If an error occurs while starting the server

    Returns Promise<void>

Generated using TypeDoc