Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        /// <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();
        }