browser.d.ts 739 B

1234567891011121314151617181920212223242526272829
  1. /// <reference types="node" />
  2. import { EventEmitter } from 'events';
  3. import Service from './service';
  4. export interface BrowserConfig {
  5. type: string;
  6. protocol?: 'tcp' | 'udp';
  7. subtypes?: Array<string>;
  8. txt?: any;
  9. }
  10. export declare class Browser extends EventEmitter {
  11. private mdns;
  12. private onresponse;
  13. private serviceMap;
  14. private txt;
  15. private name?;
  16. private txtQuery;
  17. private wildcard;
  18. private _services;
  19. constructor(mdns: any, opts: any, onup?: (service: Service) => void);
  20. start(): void;
  21. stop(): void;
  22. update(): void;
  23. get services(): any[];
  24. private addService;
  25. private removeService;
  26. private goodbyes;
  27. private buildServicesFor;
  28. }
  29. export default Browser;