static void Main(string[] args) { Console.WriteLine("SERVER !"); Thread.Sleep(1000); Reseau r = new Reseau(); r.Initialize(); r.CreationServer(); while (true) { r.SendData(Console.ReadLine()); } //r.stopLoop(Console.ReadLine()); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("CLIENT !"); rezo = new Reseau(); rezo.Initialize(); rezo.DataReceived += Rezo_DataReceived; while (true) { rezo.SendData(Console.ReadLine()); if (rezo.Clients != null) { foreach (var item in rezo.Clients) { Console.WriteLine(item); } } } Console.ReadLine(); }