amis-rpc-design/node_modules/bonjour-service/dist/lib/browser.d.ts

30 lines
739 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/// <reference types="node" />
import { EventEmitter } from 'events';
import Service from './service';
export interface BrowserConfig {
type: string;
protocol?: 'tcp' | 'udp';
subtypes?: Array<string>;
txt?: any;
}
export declare class Browser extends EventEmitter {
private mdns;
private onresponse;
private serviceMap;
private txt;
private name?;
private txtQuery;
private wildcard;
private _services;
constructor(mdns: any, opts: any, onup?: (service: Service) => void);
start(): void;
stop(): void;
update(): void;
get services(): any[];
private addService;
private removeService;
private goodbyes;
private buildServicesFor;
}
export default Browser;