From 57bf0023b19b6c0d3c948cb73f99de6f8a9d66ad Mon Sep 17 00:00:00 2001 From: sus-yoshikane-t Date: Thu, 14 Dec 2023 17:45:05 +0900 Subject: [PATCH] Add C# document and modify to rename async method --- Runtime/NativePeerClient.cs | 7 ++++--- Runtime/WebGLPeerClient.cs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Runtime/NativePeerClient.cs b/Runtime/NativePeerClient.cs index 859990d..dffec56 100644 --- a/Runtime/NativePeerClient.cs +++ b/Runtime/NativePeerClient.cs @@ -114,7 +114,7 @@ private async UniTask GetSocketAsync() return socket; } // Not covered by testing due to defensive implementation - await StopSocket(); + await StopSocketAsync(); } socket = new SocketIO(peerConfig.SignalingUrl, peerConfig.SocketOptions); @@ -307,10 +307,10 @@ protected override async UniTask DoStopAsync() pcDict.Clear(); clientState.Clear(); - await StopSocket(); + await StopSocketAsync(); } - private async UniTask StopSocket() + private async UniTask StopSocketAsync() { if (socket is null) { @@ -549,6 +549,7 @@ private async UniTask HandlePcAsync( } } + /// protected override string GetSocketId() => socket?.Id; } diff --git a/Runtime/WebGLPeerClient.cs b/Runtime/WebGLPeerClient.cs index 46f6fa1..cc0ff90 100644 --- a/Runtime/WebGLPeerClient.cs +++ b/Runtime/WebGLPeerClient.cs @@ -56,6 +56,7 @@ private static void ReceiveListHostsResponse(string jsonResponse, string unused) [MonoPInvokeCallback(typeof(Action))] private static void HandleOnUserDisconnected(string id, string unused2) => instance.FireOnUserDisconnected(id); + /// protected override string GetSocketId() => WebGLHelper.CallFunction(WithPrefix(nameof(GetSocketId))); protected override void DoReleaseManagedResources() => cancellation?.Dispose();