Skip to content

Class MinecraftLanDiscover

🏭 Constructors

constructor

ts
new MinecraftLanDiscover(type: "udp4" | "udp6"= 'udp4'): MinecraftLanDiscover

Parameters

  • type: "udp4" | "udp6"

Return Type

  • MinecraftLanDiscover

Defined in: packages/client/lan.ts:25

🏷️ Properties

#group private

ts
#group: string

Defined in: packages/client/lan.ts:19

#ready private

ts
#ready: boolean = false

Defined in: packages/client/lan.ts:18

socket readonly

ts
socket: Socket

Defined in: packages/client/lan.ts:16

🔑 Accessors

isReady

Defined in: packages/client/lan.ts:21

🔧 Methods

addListener

ts
addListener(channel: "discover", listener: Function): MinecraftLanDiscover

Parameters

  • channel: "discover"
  • listener: Function

Return Type

  • MinecraftLanDiscover

Defined in: packages/client/lan.ts:11

bind

ts
bind(): Promise<void>

Return Type

  • Promise<void>

Defined in: packages/client/lan.ts:67

broadcast

ts
broadcast(inf: LanServerInfo): Promise<number>

Parameters

  • inf: LanServerInfo

Return Type

  • Promise<number>

Defined in: packages/client/lan.ts:58

destroy

ts
destroy(): Promise<void>

Return Type

  • Promise<void>

Defined in: packages/client/lan.ts:77

on

ts
on(channel: "discover", listener: Function): MinecraftLanDiscover

Parameters

  • channel: "discover"
  • listener: Function

Return Type

  • MinecraftLanDiscover

Defined in: packages/client/lan.ts:9

once

ts
once(channel: "discover", listener: Function): MinecraftLanDiscover

Parameters

  • channel: "discover"
  • listener: Function

Return Type

  • MinecraftLanDiscover

Defined in: packages/client/lan.ts:10

removeListener

ts
removeListener(channel: "discover", listener: Function): MinecraftLanDiscover

Parameters

  • channel: "discover"
  • listener: Function

Return Type

  • MinecraftLanDiscover

Defined in: packages/client/lan.ts:12