This commit is contained in:
vis2k 2021-03-07 13:28:35 +08:00
parent 6799868517
commit 85287fe642

View File

@ -637,13 +637,7 @@ static void OnError(int connectionId, Exception exception)
Debug.LogException(exception);
}
/// <summary>
/// Register a handler for a particular message type.
/// <para>There are several system message types which you can add handlers for. You can also add your own message types.</para>
/// </summary>
/// <typeparam name="T">Message type</typeparam>
/// <param name="handler">Function handler which will be invoked when this message type is received.</param>
/// <param name="requireAuthentication">True if the message requires an authenticated connection</param>
/// <summary>Register a handler for message type T. Most should require authentication.</summary>
public static void RegisterHandler<T>(Action<NetworkConnection, T> handler, bool requireAuthentication = true)
where T : struct, NetworkMessage
{