MCPcopy Create free account
hub / github.com/Hanson/claude-client / startWebSocket

Method startWebSocket

src/feishu/handler.ts:296–313  ·  view source on GitHub ↗

* 启动 WebSocket 客户端 (长连接模式)

()

Source from the content-addressed store, hash-verified

294 * 启动 WebSocket 客户端 (长连接模式)
295 */
296 startWebSocket(): void {
297 if (this.wsClient) {
298 logger.warn('WebSocket client already started');
299 return;
300 }
301
302 const domain = this.config.domain === 'lark' ? Lark.Domain.Lark : Lark.Domain.Feishu;
303
304 this.wsClient = new Lark.WSClient({
305 appId: this.config.appId,
306 appSecret: this.config.appSecret,
307 domain,
308 loggerLevel: Lark.LoggerLevel.info,
309 });
310
311 this.wsClient.start({ eventDispatcher: this.eventDispatcher });
312 logger.info('WebSocket client started');
313 }
314
315 /**
316 * 停止 WebSocket 客户端

Callers 1

startMethod · 0.80

Calls 1

startMethod · 0.80

Tested by

no test coverage detected