use async for WriteData

This commit is contained in:
Mikhail
2024-07-11 14:35:48 -04:00
parent ed40557e19
commit 988c71c5b2
121 changed files with 132 additions and 131 deletions

View File

@@ -17,7 +17,8 @@ namespace nksrv.LobbyServer.Msgs.Auth
var req = await ReadData<ReqLogout>();
JsonDb.Instance.GameClientTokens.Remove(UsedAuthToken);
WriteData(new ResLogout());
await WriteDataAsync(new ResLogout());
}
}
}

View File

@@ -36,8 +36,9 @@ namespace nksrv.LobbyServer.Msgs.Auth
response.FeatureDataInfo = new NetFeatureDataInfo() { UseFeatureData = true };
response.Identifier = new NetLegacyUserIdentifier() { Server = 21769, Usn = (long)user.ID };
response.ShouldRestartAfter = Duration.FromTimeSpan(TimeSpan.FromSeconds(86400));
response.EncryptionToken = ByteString.CopyFromUtf8(rsp.ClientAuthToken);
WriteData(response);
await WriteDataAsync(response);
}
}
}

View File

@@ -12,7 +12,8 @@ namespace nksrv.LobbyServer.Msgs.Auth
var response = new AuthIntlResponse();
//response.BanInfo = new NetBanInfo() { BanId = 123, Description = "The server admin is sad today because the hinge on his HP laptop broke which happened to be an HP Elitebook 8470p, and the RAM controller exploded and then fixed itself, please contact him", StartAt = Timestamp.FromDateTime(DateTime.UtcNow), EndAt = Timestamp.FromDateTime(DateTime.UtcNow.AddDays(256)) };
response.AuthSuccess = new NetAuthSuccess() { AuthToken = req.Token, CentauriZoneId = "84", FirstAuth = "", PurchaseRestriction = new NetUserPurchaseRestriction() { PurchaseRestriction = PurchaseRestriction.Unknown2, UpdatedAt = 638546758794611090 } };
WriteData(response);
await WriteDataAsync(response);
}
}
}