Class LocalDiscovery

Hierarchy

  • TypedEmitter
    • LocalDiscovery

Constructors

Methods

Constructors

Methods

  • Parameters

    • peer: {
          address: string;
          name: string;
          port: number;
      }
      • address: string
      • name: string
      • port: number

    Returns void

  • Returns Promise<{
        name: string;
        port: number;
    }>

  • Close all servers and stop multicast advertising and browsing. Will wait for open sockets to close unless opts.force=true in which case open sockets are force-closed after opts.timeout milliseconds

    Parameters

    • Optionalopts: {
          force: undefined | boolean;
          timeout: undefined | number;
      }
      • force: undefined | boolean

        Force-close open sockets after timeout milliseconds

      • timeout: undefined | number

        Optional timeout when calling stop() with force=true

    Returns Promise<void>