mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
MessagePacker.MessageHandler renamed to WrapHandler because that's what it does
This commit is contained in:
parent
99b3d95484
commit
56a054ba67
@ -85,7 +85,7 @@ public static bool UnpackMessage(NetworkReader messageReader, out int msgType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static NetworkMessageDelegate MessageHandler<T, C>(Action<C, T> handler, bool requireAuthenication)
|
internal static NetworkMessageDelegate WrapHandler<T, C>(Action<C, T> handler, bool requireAuthenication)
|
||||||
where T : struct, NetworkMessage
|
where T : struct, NetworkMessage
|
||||||
where C : NetworkConnection
|
where C : NetworkConnection
|
||||||
=> (conn, reader) =>
|
=> (conn, reader) =>
|
||||||
|
@ -204,7 +204,7 @@ public static void RegisterHandler<T>(Action<NetworkConnection, T> handler, bool
|
|||||||
{
|
{
|
||||||
Debug.LogWarning($"NetworkClient.RegisterHandler replacing handler for {typeof(T).FullName}, id={msgType}. If replacement is intentional, use ReplaceHandler instead to avoid this warning.");
|
Debug.LogWarning($"NetworkClient.RegisterHandler replacing handler for {typeof(T).FullName}, id={msgType}. If replacement is intentional, use ReplaceHandler instead to avoid this warning.");
|
||||||
}
|
}
|
||||||
handlers[msgType] = MessagePacker.MessageHandler(handler, requireAuthentication);
|
handlers[msgType] = MessagePacker.WrapHandler(handler, requireAuthentication);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -475,7 +475,7 @@ public static void RegisterHandler<T>(Action<NetworkConnection, T> handler, bool
|
|||||||
{
|
{
|
||||||
Debug.LogWarning($"NetworkServer.RegisterHandler replacing handler for {typeof(T).FullName}, id={msgType}. If replacement is intentional, use ReplaceHandler instead to avoid this warning.");
|
Debug.LogWarning($"NetworkServer.RegisterHandler replacing handler for {typeof(T).FullName}, id={msgType}. If replacement is intentional, use ReplaceHandler instead to avoid this warning.");
|
||||||
}
|
}
|
||||||
handlers[msgType] = MessagePacker.MessageHandler(handler, requireAuthentication);
|
handlers[msgType] = MessagePacker.WrapHandler(handler, requireAuthentication);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -502,7 +502,7 @@ public static void ReplaceHandler<T>(Action<NetworkConnection, T> handler, bool
|
|||||||
where T : struct, NetworkMessage
|
where T : struct, NetworkMessage
|
||||||
{
|
{
|
||||||
int msgType = MessagePacker.GetId<T>();
|
int msgType = MessagePacker.GetId<T>();
|
||||||
handlers[msgType] = MessagePacker.MessageHandler(handler, requireAuthentication);
|
handlers[msgType] = MessagePacker.WrapHandler(handler, requireAuthentication);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user