From 8353a6f5aa99453c196b54d057c4aa4964d80166 Mon Sep 17 00:00:00 2001 From: Cloet Date: Sat, 8 Feb 2020 15:27:02 +0100 Subject: [PATCH] Method had an incorrect name --- Examples/Console/NetCore.Console.Client/Client.cs | 2 +- Examples/Console/NetCore.Console.Server/Server.cs | 7 ++++++- SimpleSockets/Server/SimpleSocketListener.cs | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Examples/Console/NetCore.Console.Client/Client.cs b/Examples/Console/NetCore.Console.Client/Client.cs index 0c55e82..db0872a 100644 --- a/Examples/Console/NetCore.Console.Client/Client.cs +++ b/Examples/Console/NetCore.Console.Client/Client.cs @@ -154,7 +154,7 @@ private static async void SendCustom() dictionary.Add("Test", "This is a value"); dictionary.Add("Test2", "This is a second value"); - await _client.SendMessageWithMetadataAsync("This is a message", dictionary); + await _client.SendMessageWithMetadataAsync(message, dictionary); // await _client.SendCustomHeaderAsync(message, header, _compress, _encrypt); } diff --git a/Examples/Console/NetCore.Console.Server/Server.cs b/Examples/Console/NetCore.Console.Server/Server.cs index 4775a57..98f7707 100644 --- a/Examples/Console/NetCore.Console.Server/Server.cs +++ b/Examples/Console/NetCore.Console.Server/Server.cs @@ -173,7 +173,12 @@ private static async void SendCustom() Write("Enter the message you want to send... "); var message = System.Console.ReadLine(); - // await _listener.SendCustomHeaderAsync(id, message, header, _compress, _encrypt, false); + var dictionary = new Dictionary(); + + dictionary.Add("Test", "This is a value"); + dictionary.Add("Test2", "This is a second value"); + + await _listener.SendMessageWithMetadataAsync(id, message, dictionary); } private static async void SendFile() diff --git a/SimpleSockets/Server/SimpleSocketListener.cs b/SimpleSockets/Server/SimpleSocketListener.cs index 5d6d7e9..ce29afc 100644 --- a/SimpleSockets/Server/SimpleSocketListener.cs +++ b/SimpleSockets/Server/SimpleSocketListener.cs @@ -798,7 +798,7 @@ public void SendMessageWithMetadata(int id, object message, IDictionary metadata, bool compress = false, bool encrypt = false, bool close = false) + public async Task SendMessageWithMetadataAsync(int id, object message, IDictionary metadata, bool compress = false, bool encrypt = false, bool close = false) { if (ObjectSerializer == null) throw new ArgumentNullException(nameof(ObjectSerializer));