static void Main(string[] args) { Thread thread = new Thread(new ParameterizedThreadStart(start_logger)); IPHostEntry host = Dns.GetHostEntry("localhost"); IPAddress ip = host.AddressList[1]; Server server = new Server(ip, 13000, 1024); thread.Start(server); server.start(100); }
static void Main(string[] args) { try { Console.WriteLine("Please enter a port number: "); string port = Console.ReadLine(); UInt16 numPort; UInt16.TryParse(port, out numPort); Server server = new Server(numPort); server.start(); } catch (Exception e) { Console.WriteLine(e.Message); } }
static void Main(string[] args) { Server server = new Server(); InformationMessage.show("server created"); server.start(); InformationMessage.show("server started"); String input = ""; while (input != "exit") { input = Console.ReadLine(); } server.stop(); Thread.Sleep(1000); InformationMessage.show("press any key to continue..."); Console.ReadLine(); }