UNPKG

646 BTypeScriptView Raw
1/// <reference types="node" />
2import { AddressInfo } from 'net';
3import { SocketBase } from './SocketBase';
4/**
5 * Class representing a SSDP socket that support the HTTP method M-SEARCH.
6 */
7export declare class MSearchSocket extends SocketBase {
8 private address;
9 /**
10 * @param address The network address to listen for M-SEARCH responses on.
11 */
12 constructor(address: string);
13 /**
14 * Starts a search by using HTTP method M-SEARCH.
15 */
16 search(): Promise<void>;
17 protected onListening(): void;
18 protected onMessage(messageBuffer: Buffer, remote: AddressInfo): void;
19 protected bind(): Promise<void>;
20}