Add IPacketHandler

This commit is contained in:
Chris 2020-06-02 10:44:10 +09:30
parent b5c3b430fa
commit 5b72ff6c0a
4 changed files with 28 additions and 11 deletions

View file

@ -0,0 +1,16 @@
namespace TShockAPI.Handlers
{
/// <summary>
/// Describes a packet handler that receives a packet from a GetDataHandler
/// </summary>
/// <typeparam name="TEventArgs"></typeparam>
public interface IPacketHandler<TEventArgs> where TEventArgs : GetDataHandledEventArgs
{
/// <summary>
/// Invoked when the packet is received
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
void OnReceive(object sender, TEventArgs args);
}
}