Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ServerShutdown

Index

Constructors

constructor

Methods

forceShutdown

  • forceShutdown(callback?: function): void
  • Shutdown all the servers registered with all connections forcefully disconnected.

    Parameters

    • Optional callback: function
        • (): void
        • Returns void

    Returns void

registerAdapter

  • registerAdapter(name: string, adapter: IAdapter): void
  • Register a server adapter with the system. Name should be a string and adapter is an object that contains a close(server, callback) function that is responsible for closing the server and a socketClose(socket) function that is responsible for destroying the sockets the server creates.

    Parameters

    • name: string

      The unique name of the adapter

    • adapter: IAdapter

      The adapter instance

    Returns void

registerServer

  • registerServer(server: IServer): void
  • registerServer(server: IServer, adapterName: string): void
  • Registers a http server with the library.

    Parameters

    • server: IServer

      The server instance

    Returns void

  • Registers a server with the library with an adapter name used to set the type of server being registered.

    Parameters

    • server: IServer

      The server instance

    • adapterName: string

    Returns void

shutdown

  • shutdown(callback?: function): void
  • Shutdown all the registered servers.

    Parameters

    • Optional callback: function

      The callback called once all connections are disconnected and servers are closed.

        • (): void
        • Returns void

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc