我想使用对象序列化在Mono服务器和Silverlight客户端之间通过网络进行通信.序列化节省空间并且速度非常快非常重要,因为服务器将承载多个实时游戏.
我应该使用什么技术?BinaryFormatter为此应用程序中不需要的序列化类(版本,文化,类名,属性名等)增加了大量开销.
我能做些什么来提高空间效率?
我有以下对象:
public partial class Game
{
public bool Finished { get; set; }
public Guid GameGUID { get; set; }
public long GameID { get; set; }
public bool GameSetup { get; set; }
public Nullable<int> MaximumCardsInDeck { get; set; }
public Player Player { get; set; }
public Player Player1 { get; set; }
public bool Player1Connected { get; set; }
public bool Player1EnvironmentSetup { get; set; }
public long Player1ID { get; set; }
public int Player1Won { …Run Code Online (Sandbox Code Playgroud)