TH1/Store/WebSocketJs.md
2025-07-17 18:26:28 +08:00

17 lines
615 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ET-EUI
基于ET框架的封装的WebSocket支持WebGL
#### 使用方式
- 在SceneFactory的CreateZoneScene上添加
zoneScene.AddComponent<NetWSJSComponent, int>(SessionStreamDispatcherType.SessionStreamDispatcherClientOuter);
- 在使用的时候先创建Session
Session gateSession = zoneScene.GetComponent<NetWSJSComponent>().Create($"ws://{r2CLoginZone.GateAddrss}");
- 拿到Session正常发送就行
G2C_Login2Gate g2CLogin2Gate = (G2C_Login2Gate)await gateSession.Call(new C2G_Login2Gate() { GateKey = r2CLoginZone.GateKey });
#### 插件地址
https://gitee.com/chen_fen_hui/web-socket-js.git