Exemple #1
0
 public bool ValidateHash()
 {
     if (string.IsNullOrEmpty(hash))
     {
         return(false);
     }
     return(hash.Equals(CentralNetworkManager.GetAppServerRegisterHash(peerInfo.peerType, time)));
 }
 public void Serialize(NetDataWriter writer)
 {
     time = (int)System.DateTimeOffset.Now.ToUnixTimeSeconds();
     hash = CentralNetworkManager.GetAppServerRegisterHash(peerInfo.peerType, time);
     peerInfo.Serialize(writer);
     writer.Put(time);
     writer.Put(hash);
 }
Exemple #3
0
 public void Serialize(NetDataWriter writer)
 {
     time = (int)(System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond);
     hash = CentralNetworkManager.GetAppServerRegisterHash(peerInfo.peerType, time);
     peerInfo.Serialize(writer);
     writer.Put(time);
     writer.Put(hash);
 }
 public override void SerializeData(NetDataWriter writer)
 {
     if (peerInfo == null)
         peerInfo = new CentralServerPeerInfo();
     time = (int)(System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond);
     hash = CentralNetworkManager.GetAppServerRegisterHash(peerInfo.peerType, time);
     peerInfo.Serialize(writer);
     writer.Put(time);
     writer.Put(hash);
 }