using System; using System.Collections.Generic; using System.Net; namespace franz.tests { class Program { static void Main(string[] args) { Console.WriteLine("Hello World, I'm " + Dns.GetHostName()); Telefranz.Configure("tester", "alloces:9092", new System.Collections.Generic.List(){"a!"}); Console.WriteLine("telefranz configured"); Telefranz.Instance.addHandler(r => { Console.WriteLine("a report (response to soundoff) has come in"); Console.WriteLine(r); }); Telefranz.Instance.addHandler((ec) => { Console.WriteLine("message received: execute_command"); if(ec.command == "a!"){ Console.WriteLine($"a! command executing! {string.Join("; ", ec.args)}"); } }); Telefranz.Instance.ProduceMessage(new gray_messages.global.sound_off()); System.Threading.Thread.Sleep(15000); Telefranz.Instance.ProduceMessage(new gray_messages.directorial.execute_command(){ command= "a!", args= "parameters to pass along" }); System.Threading.Thread.Sleep(5000); Console.WriteLine("k."); } } }