namespace XGame.Framework.Network { public interface ISerializer { void Write(IMessage msg, out byte[] bytes, out int offset, out int size); void Read(byte[] bytes, int offset, int size, int protoId, out IMessage msg); } }