public static void Main(string[] args) { Console.Title = "Console Client"; try { using (var stack = new KunoStack()) { stack.UseAkka(); for (int i = 0; i < 10; i++) { stack.Send("go"); } stack.Shutdown().Wait(); Console.ReadKey(); } } catch (Exception exception) { Console.WriteLine(exception); } }
/// <summary> /// Configures the stack to use Akka.NET Messaging and runs the Akka host. /// </summary> /// <param name="instance">The this instance.</param> /// <param name="configuration">The configuration routine.</param> /// <returns>KunoStack.</returns> public static void RunAkkaHost(this KunoStack instance, Action <MessagingOptions> configuration = null) { instance.UseAkka(configuration); instance.GetExit().Wait(); }