﻿using System;

namespace Easily.Framework.Network {

static public class PacketMetas {

	static readonly public Tuple<byte, Type> JSON = Tuple.Create<byte, Type>(1, typeof(JsonPacket));
	static readonly public Tuple<byte, Type> PROTO = Tuple.Create<byte, Type>(2, typeof(ProtoPacket));
	static readonly public Tuple<byte, Type> RPC = Tuple.Create<byte, Type>(3, typeof(RpcPacket));
	static readonly public Tuple<byte, Type> LIST = Tuple.Create<byte, Type>(4, typeof(ListPacket));
	static readonly public Tuple<byte, Type> INNER = Tuple.Create<byte, Type>(5, typeof(InnerPacket));

	static public NetPacket NewPacket<T>() where T : NetPacket, new() {
		return new T();
	}

}

}