Class Server

EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.

Hierarchy

Methods

  • The "accept" event is fired when a new TCP client connection has been established. Use the fd property to determine which file descriptor to read / write to interact with this socket.

    Parameters

    • type: "accept"
    • listener: ((ev) => any)
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • type: string
    • listener: EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Shuts down the server and closes any existing client connections.

    Returns void

Generated using TypeDoc