using System; using System.Net; using OpenMetaverse; using OpenMetaverse.Packets; namespace Simian { public enum PacketCategory { /// Any sort of transactional message, such as /// AgentMovementComplete Transaction = 0, /// State synchronization, such as animations or /// object updates State, /// State synchronization of inventory Inventory, /// State synchronization of terrain, LayerData /// packets Terrain, /// Asset transfer packets Asset, /// Texture transfer packets Texture, /// Protocol overhead such as PacketAck Overhead, } /// /// Coupled with RegisterCallback(), this is triggered whenever a packet /// of a registered type is received /// public delegate void PacketCallback(Packet packet, Agent agent); public interface IUDPProvider { void AddClient(Agent agent, IPEndPoint endpoint); bool RemoveClient(Agent agent); uint CreateCircuit(Agent agent); void SendPacket(UUID agentID, Packet packet, PacketCategory category); void BroadcastPacket(Packet packet, PacketCategory category); void RegisterPacketCallback(PacketType type, PacketCallback callback); } }