跳到主要内容
版本:Next

SocketIOWrapperClient

Index

Constructors

constructor

Methods

close

  • close(): void

connect

  • connect(): Promise<unknown>

emit

  • emit(eventName: string, ...args: any[]): Socket<DefaultEventsMap, DefaultEventsMap>

getSocket

  • getSocket(): Socket<DefaultEventsMap, DefaultEventsMap>

on

  • on(eventName: string, handler: any): void

once

  • once(eventName: string, handler: any): Socket<DefaultEventsMap, DefaultEventsMap>

removeListener

  • removeListener(event: string, fn?: any): Socket<DefaultEventsMap, DefaultEventsMap>

send

  • send(eventName: string, ...args: any[]): void

sendWithAck

  • sendWithAck(eventName: string, ...args: any[]): Promise<unknown>