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

ts
_destroyed: boolean

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

multicast

ts
multicast: string

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

port

ts
port: number

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

sockets

ts
sockets: Socket[]

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

sourcePort

ts
sourcePort: number

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

🔧 Methods

_parseMimeHeader

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

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

Released under the MIT License.