版本:NextMethods
- connect(): Promise<unknown>
- emit(eventName: string, ...args: any[]): Socket<DefaultEventsMap, DefaultEventsMap>
- getSocket(): Socket<DefaultEventsMap, DefaultEventsMap>
- on(eventName: string, handler: any): void
- once(eventName: string, handler: any): Socket<DefaultEventsMap, DefaultEventsMap>
- removeListener(event: string, fn?: any): Socket<DefaultEventsMap, DefaultEventsMap>
- send(eventName: string, ...args: any[]): void
- sendWithAck(eventName: string, ...args: any[]): Promise<unknown>