This commit is contained in:
vis2k 2021-03-13 13:51:20 +08:00
parent 0949c9d875
commit b2892e7e1a

View File

@ -301,6 +301,7 @@ public static void Send<T>(T message, int channelId = Channels.DefaultReliable)
// message handlers //////////////////////////////////////////////////// // message handlers ////////////////////////////////////////////////////
/// <summary>Register a handler for a message type T. Most should require authentication.</summary> /// <summary>Register a handler for a message type T. Most should require authentication.</summary>
// TODO remove. don't need redundant NetworkConnection parameter. it's always .connection anyway.
public static void RegisterHandler<T>(Action<NetworkConnection, T> handler, bool requireAuthentication = true) public static void RegisterHandler<T>(Action<NetworkConnection, T> handler, bool requireAuthentication = true)
where T : struct, NetworkMessage where T : struct, NetworkMessage
{ {