2023-05-29 22:23:11 +02:00
|
|
|
|
using Lidgren.Network;
|
2023-07-05 02:52:32 +02:00
|
|
|
|
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();
|
2023-07-05 02:52:32 +02:00
|
|
|
|
/// <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);
|
2023-07-05 02:52:32 +02:00
|
|
|
|
/// <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
|
|
|
|
}
|
|
|
|
|
}
|