Skip to content

Class Ssdp

🏭 Constructors

constructor

ts
new Ssdp(sourcePort: number, sockets: Socket[]): Ssdp

Parameters

  • sourcePort: number
  • sockets: Socket[]

Return Type

  • Ssdp

Defined in: packages/nat-api/lib/ssdp.ts:53

🏷️ Properties

_destroyed private

ts
_destroyed: boolean

Defined in: packages/nat-api/lib/ssdp.ts:51

multicast readonly

ts
multicast: string

Defined in: packages/nat-api/lib/ssdp.ts:48

port readonly

ts
port: number

Defined in: packages/nat-api/lib/ssdp.ts:49

sockets readonly

ts
sockets: Socket[]

Defined in: packages/nat-api/lib/ssdp.ts:55

sourcePort readonly

ts
sourcePort: number

Defined in: packages/nat-api/lib/ssdp.ts:54

🔧 Methods

_parseMimeHeader private

ts
_parseMimeHeader(headerStr: string): Record<string, string>

Parameters

  • headerStr: string

Return Type

  • Record<string, string>

Defined in: packages/nat-api/lib/ssdp.ts:132

_parseResponse private

ts
_parseResponse(response: string, addr: AddressInfo, remote: RemoteInfo): void

Parameters

  • response: string
  • addr: AddressInfo
  • remote: RemoteInfo

Return Type

  • void

Defined in: packages/nat-api/lib/ssdp.ts:118

destroy

ts
destroy(): void

Return Type

  • void

Defined in: packages/nat-api/lib/ssdp.ts:145

ts
search(device: string): Promise<SsdpSearchResult>

Parameters

  • device: string

Return Type

  • Promise<SsdpSearchResult>

Defined in: packages/nat-api/lib/ssdp.ts:86