This commit is contained in:
2025-08-21 15:29:43 +02:00
parent d86433db2a
commit 1b11821ebc
11 changed files with 707 additions and 160 deletions

View File

@@ -22,21 +22,6 @@ namespace EonaCat.Connections.Client.Example
break;
}
var jsonUrl = "https://microsoftedge.github.io/Demos/json-dummy-data/5MB-min.json";
try
{
using var httpClient = new HttpClient();
var jsonContent = await httpClient.GetStringAsync(jsonUrl);
var jsonSize = Encoding.UTF8.GetByteCount(jsonContent);
Console.WriteLine($"Using large JSON file (size: {jsonSize / 1024 / 1024} MB)");
message = jsonContent;
}
catch (Exception ex)
{
Console.WriteLine($"Failed to download large JSON file: {ex.Message}");
}
if (!string.IsNullOrEmpty(message))
{
await _client.SendAsync(message).ConfigureAwait(false);
@@ -53,8 +38,8 @@ namespace EonaCat.Connections.Client.Example
Port = 1111,
UseSsl = false,
UseAesEncryption = true,
AesPassword = "p@ss",
//ServerCertificate = new System.Security.Cryptography.X509Certificates.X509Certificate2("client.pfx", "p@ss"),
AesPassword = "EonaCat.Connections.Password",
Certificate = new System.Security.Cryptography.X509Certificates.X509Certificate2("client.pfx", "p@ss"),
};
_client = new NetworkClient(config);