MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / HandleWebGLClose

Method HandleWebGLClose

sdks/csharp/src/WebSocket.cs:552–564  ·  view source on GitHub ↗
(int socketId, int code, string reason)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected