(int socketId, int code, string reason)
| 550 | } |
| 551 | |
| 552 | public void HandleWebGLClose(int socketId, int code, string reason) |
| 553 | { |
| 554 | UnityEngine.Debug.Log($"HandleWebGLClose: {code} {reason}"); |
| 555 | if (socketId == _webglSocketId && OnClose != null) |
| 556 | { |
| 557 | _isConnected = false; |
| 558 | _isConnecting = false; |
| 559 | _webglSocketId = -1; |
| 560 | _cancelConnectRequested = false; |
| 561 | var ex = code != (int)WebSocketCloseStatus.NormalClosure ? new Exception($"WebSocket closed with code {code}: {reason}") : null; |
| 562 | dispatchQueue.Enqueue(() => OnClose?.Invoke(ex)); |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | public void HandleWebGLError(int socketId) |
| 567 | { |
nothing calls this directly
no outgoing calls
no test coverage detected