From 350d9cd5b2865fc094e468349768ee9887895834 Mon Sep 17 00:00:00 2001
From: MrGadget <9826063+MrGadget1024@users.noreply.github.com>
Date: Sat, 20 Jul 2024 11:17:02 -0400
Subject: [PATCH] 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
---
Assets/Mirror/Core/Transport.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Assets/Mirror/Core/Transport.cs b/Assets/Mirror/Core/Transport.cs
index 6d4f70703..dfe3aa184 100644
--- a/Assets/Mirror/Core/Transport.cs
+++ b/Assets/Mirror/Core/Transport.cs
@@ -66,8 +66,12 @@ public abstract class Transport : MonoBehaviour
public Action OnClientDisconnected;
// server //////////////////////////////////////////////////////////////
- /// Called by Transport when a new client connected to the server.
+
+ // Deprecated 2024-07-20
+ [Obsolete("Use OnServerConnectedWithAddress and pass the remote client address instead")]
public Action OnServerConnected;
+
+ /// Called by Transport when a new client connected to the server.
public Action OnServerConnectedWithAddress;
/// Called by Transport when the server received a message from a client.