Updated
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user