using System; using System.Net; using Mistox.Attributes; namespace Mistox.ResevedPackets { // Packet sent to clients when they are in range telling them to connect together [mPacket] public class UserConnectedPacket { public string UserName { get; set; } public IPAddress ClientIPAddress { get; set; } } // Packet send to server for Auth and responded to the client with Auth Success [mPacket] public class UserAuthPacket { // Sent to the server public string UserName { get; set; } = ""; public string ConnectionKey { get; set; } = ""; // Response from the server public string ServerName { get; set; } = ""; public int AuthSuccessful { get; set; } = 0; // 0 is standard, -1 is auth failure, 1 is auth success } // Generic networked object packet [mPacket] public class EntityPacket { // Tag to make sure the object on the other side is the same object i want to update here // Need to map these Object ID's to a dictionary to make sure I only send network updates when there is a change public ushort ObjectId { get; set; } // Packet payload data that im matching for in the dictionary public byte[] InnerPayload { get; set; } } // Packet sent to all clients when a users TCP stream disconnects from the server [mPacket] public class UserDisconnectedPacket { public string UserName { get; set; } } }