Skip to content

Commit

Permalink
refactor: making add remove connections private
Browse files Browse the repository at this point in the history
These methods are only used within network server, and there is no need for someone too manually add a network player.

BREAKING CHANGE: NetworkServer methods AddConnection and RemoveConnection are no longer public
  • Loading branch information
James-Frowen committed Apr 29, 2023
1 parent 91e7be3 commit 0cac9a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Mirage/Runtime/NetworkServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private void Cleanup()
/// <para>This connection will use the callbacks registered with the server.</para>
/// </summary>
/// <param name="player">Network connection to add.</param>
public void AddConnection(INetworkPlayer player)
private void AddConnection(INetworkPlayer player)
{
if (!Players.Contains(player))
{
Expand All @@ -393,7 +393,7 @@ public void AddConnection(INetworkPlayer player)
/// This removes an external connection.
/// </summary>
/// <param name="connectionId">The id of the connection to remove.</param>
public void RemoveConnection(INetworkPlayer player)
private void RemoveConnection(INetworkPlayer player)
{
_connections.Remove(player.Connection);
}
Expand Down

0 comments on commit 0cac9a3

Please sign in to comment.