Cancel an in-flight ConnectAsync. Safe to call if no connect is pending.
()
| 391 | /// Cancel an in-flight ConnectAsync. Safe to call if no connect is pending. |
| 392 | /// </summary> |
| 393 | public void CancelConnect() |
| 394 | { |
| 395 | #if UNITY_WEBGL && !UNITY_EDITOR |
| 396 | // No CTS on WebGL. Mark cancel intent so that when socket id arrives or open fires, |
| 397 | // we immediately close and avoid reporting a connected state. |
| 398 | _cancelConnectRequested = true; |
| 399 | #else |
| 400 | try { _connectCts?.Cancel(); } catch { /* ignore */ } |
| 401 | #endif |
| 402 | } |
| 403 | |
| 404 | public Task Close(WebSocketCloseStatus code = WebSocketCloseStatus.NormalClosure) |
| 405 | { |
nothing calls this directly
no outgoing calls
no test coverage detected