static void Main(string[] args) { try { int port = 50000; AsyncService service = new AsyncService(port); service.Run(); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } }
static void Main(string[] args) { try { // Generally ok to use ports between 49152 and 65535 // should check to make sure port isn't in use int port = 50000; AsyncService service = new AsyncService(port); service.Run(); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } }
static void Main() { try { var ipAddress = "127.0.0.1"; var port = 7777; var service = new AsyncService(ipAddress, port); service.Run(); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.ReadLine(); } }