Skip to content

Commit

Permalink
Add C# document and modify to rename async method
Browse files Browse the repository at this point in the history
  • Loading branch information
sus-yoshikane-t committed Dec 14, 2023
1 parent 1f211bc commit 57bf002
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Runtime/NativePeerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private async UniTask<SocketIO> GetSocketAsync()
return socket;
}
// Not covered by testing due to defensive implementation
await StopSocket();
await StopSocketAsync();
}

socket = new SocketIO(peerConfig.SignalingUrl, peerConfig.SocketOptions);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -549,6 +549,7 @@ private async UniTask HandlePcAsync(
}
}

/// <inheritdoc/>
protected override string GetSocketId() => socket?.Id;
}

Expand Down
1 change: 1 addition & 0 deletions Runtime/WebGLPeerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ private static void ReceiveListHostsResponse(string jsonResponse, string unused)
[MonoPInvokeCallback(typeof(Action<string, string>))]
private static void HandleOnUserDisconnected(string id, string unused2) => instance.FireOnUserDisconnected(id);

/// <inheritdoc/>
protected override string GetSocketId() => WebGLHelper.CallFunction(WithPrefix(nameof(GetSocketId)));

protected override void DoReleaseManagedResources() => cancellation?.Dispose();
Expand Down

0 comments on commit 57bf002

Please sign in to comment.