예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("========== OSPREY SERVER ==========");

            using (Osprey.Default())
                using (Osprey.Join("osprey.server"))
                    using (var tcp = new TcpServer("mango"))
                    {
                        StartSendingHttp();

                        Task.Run(() =>
                        {
                            while (true)
                            {
                                tcp.Broadcast(Guid.NewGuid().ToString());
                                Thread.Sleep(100);
                            }
                        });

                        while (true)
                        {
                            Thread.Sleep(1000);
                        }
                    }
        }
예제 #2
0
        static void Main(string[] args)
        {
            using (Osprey.Default())
                using (Osprey.Join("osprey.monitor"))
                {
                    while (true)
                    {
                        Console.Clear();
                        Console.WriteLine("========== OSPREY MONITOR ==========");
                        Console.WriteLine("");
                        PrintDiscovered();

                        Thread.Sleep(2000);
                    }
                }
        }
예제 #3
0
파일: Program.cs 프로젝트: ziachap/Osprey
        static void Main(string[] args)
        {
            Console.WriteLine("========== OSPREY CLIENT ==========");

            using (Osprey.Default())
                using (Osprey.Join("osprey.client"))
                    using (new TcpServer("tcp1"))
                        using (new TcpServer("tcp2"))
                            using (new TcpServer("tcp3"))
                                using (new HttpServer <DefaultStartup <DefaultNancyBootstrapper> >("http"))
                                {
                                    ConnectToTcpServer();

                                    while (true)
                                    {
                                        Thread.Sleep(1000);
                                    }
                                }
        }