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); } } }
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); } } }
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); } } }