diff --git a/franz.tests/Program.cs b/franz.tests/Program.cs index 7868586..9917478 100644 --- a/franz.tests/Program.cs +++ b/franz.tests/Program.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Net; namespace franz.tests { @@ -6,14 +8,24 @@ namespace franz.tests { static void Main(string[] args) { - Console.WriteLine("Hello World!"); - Telefranz.Configure("tester", "focalor:9092"); + Console.WriteLine("Hello World, Im' " + Dns.GetHostName()); + Telefranz.Configure("tester", "focalor:9092", new System.Collections.Generic.List(){"a!"}); Telefranz.Instance.addHandler(r => { Console.WriteLine(r); }); + Telefranz.Instance.addHandler((ec) => { + if(ec.command == "a!"){ + Console.WriteLine($"a! command executing! {string.Join("; ", ec.args)}"); + } + }); Telefranz.Instance.ProduceMessage(new silver_messages.global.sound_off()); - System.Threading.Thread.Sleep(10000); + System.Threading.Thread.Sleep(15000); + Telefranz.Instance.ProduceMessage(new silver_messages.directorial.execute_command(){ + command= "a!", + args= new List(){"param 1", "param 2"} + }); + System.Threading.Thread.Sleep(5000); Console.WriteLine("k."); } } diff --git a/franz/Telefranz.cs b/franz/Telefranz.cs index 920dd51..603a607 100644 --- a/franz/Telefranz.cs +++ b/franz/Telefranz.cs @@ -4,6 +4,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Reflection; using System.Threading; using System.Threading.Tasks; @@ -49,6 +50,7 @@ namespace franz this.howToReport = new silver_messages.global.report() { name = name, + host = Dns.GetHostName(), errors = errors ?? new List(), warnings = warnings ?? new List() }; @@ -154,7 +156,6 @@ namespace franz { clusterClient.Produce(typeof(T).ToString(), message.ToString()); } - public void HiImAFunction() { } } public class NotInitializedException : Exception { diff --git a/franz/franz.csproj b/franz/franz.csproj index 3cb3883..24620bd 100644 --- a/franz/franz.csproj +++ b/franz/franz.csproj @@ -3,7 +3,7 @@ net5.0 silvermeddlists.franz - 0.0.8 + 0.0.9 adam Silver Meddlists diff --git a/franz/silver_messages/global/report.cs b/franz/silver_messages/global/report.cs index 7fda720..cc4b34b 100644 --- a/franz/silver_messages/global/report.cs +++ b/franz/silver_messages/global/report.cs @@ -6,6 +6,8 @@ namespace silver_messages.global { //your name public string name { get; set; } + //the hardware you live on + public string host { get; set; } //capabilities by name which aren't implied by your name public Capabilites capabilites { get; set; } = new Capabilites();