Updated
This commit is contained in:
@@ -8,7 +8,7 @@ using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static WebSocket _client;
|
||||
private static WSClient _client;
|
||||
private static WSServer _server;
|
||||
|
||||
private static async Task Main(string[] args)
|
||||
@@ -66,8 +66,8 @@ internal class Program
|
||||
StartServer(serverUri, certificatePath, certificatePassword, requiredPassword);
|
||||
|
||||
// Start the client in the main thread
|
||||
_client = new WebSocket(clientUri);
|
||||
_client.SslConfiguration.Certificates.Add(new X509Certificate(certificatePath, certificatePassword));
|
||||
_client = new WSClient(clientUri);
|
||||
_client.SSL.Certificates.Add(new X509Certificate(certificatePath, certificatePassword));
|
||||
_client.OnConnect += (sender, e) => Console.WriteLine($"Connected to server");
|
||||
_client.OnMessageReceived += (sender, e) => Console.WriteLine($"Received message from server: {e.Data}");
|
||||
_client.OnDisconnect += (sender, e) => Console.WriteLine($"Disconnected from server: {e.Code} : {e.Reason}");
|
||||
|
||||
Reference in New Issue
Block a user