feat(Transport): Obsoloete OnServerConnected

Use OnServerConnectedWithAddress and pass the remote client address instead
- This allows Mirror to cache the remote client address to save round-trip calls to the transport
This commit is contained in:
MrGadget 2024-07-20 11:17:02 -04:00
parent 9dcc6a0953
commit 350d9cd5b2

View File

@ -66,8 +66,12 @@ public abstract class Transport : MonoBehaviour
public Action OnClientDisconnected;
// server //////////////////////////////////////////////////////////////
/// <summary>Called by Transport when a new client connected to the server.</summary>
// Deprecated 2024-07-20
[Obsolete("Use OnServerConnectedWithAddress and pass the remote client address instead")]
public Action<int> OnServerConnected;
/// <summary>Called by Transport when a new client connected to the server.</summary>
public Action<int, string> OnServerConnectedWithAddress;
/// <summary>Called by Transport when the server received a message from a client.</summary>