SRMP-Public/SRMP/Packets/_Classes/IPacket.cs

25 lines
730 B
C#
Raw Normal View History

2023-05-29 22:23:11 +02:00
using Lidgren.Network;
using SRMultiplayer.Networking;
2023-05-29 22:23:11 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SRMultiplayer.Packets
{
public interface IPacket
{
PacketType GetPacketType();
/// <summary>
/// Searilizes the given packet item
/// </summary>
/// <param name="om">Outgoing Message that the packet should be added to</param>
2023-05-29 22:23:11 +02:00
void Serialize(NetOutgoingMessage om);
/// <summary>
/// Deserializes the given packet item
/// </summary>
/// <param name="om">Incoming Message that the packet should be deserialized from</param>
void Deserialize(NetIncomingMessage im);
2023-05-29 22:23:11 +02:00
}
}