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

Method HandleWebGLOpen

sdks/csharp/src/WebSocket.cs:525–542  ·  view source on GitHub ↗
(int socketId)

Source from the content-addressed store, hash-verified

523
524#if UNITY_WEBGL && !UNITY_EDITOR
525 public void HandleWebGLOpen(int socketId)
526 {
527 if (socketId == _webglSocketId)
528 {
529 if (_cancelConnectRequested)
530 {
531 // Immediately close instead of reporting connected.
532 WebSocket_Close(_webglSocketId, (int)WebSocketCloseStatus.NormalClosure, "Canceled during connect.");
533 _isConnecting = false;
534 _isConnected = false;
535 _cancelConnectRequested = false;
536 return;
537 }
538 _isConnected = true;
539 if (OnConnect != null)
540 dispatchQueue.Enqueue(() => OnConnect());
541 }
542 }
543
544 public void HandleWebGLMessage(int socketId, byte[] message)
545 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected