//main method starts with StartListening() static void Main(String[] args) { log4net.Config.XmlConfigurator.Configure(); log.Debug("Server starts!"); AsynchronousSocketListener myASL = new AsynchronousSocketListener(); myASL.StartListening(); }
static async Task StartUDPClient() { // UDPSocket sock = new UDPSocket(); // await sock.StartListening(config.Servers[0].Port); // await sock.SendTo(config.Client.Address, config.Client.Port, "Hello Client 1, this is the server"); AsynchronousSocketListener socket = new AsynchronousSocketListener(); socket.StartListening(config.Servers[0].Address, config.Servers[0].Port); //await socket.StartListener(config.Servers[0].Port,config.Client.Address, config.Client.Port); //await socket.StartListener(config.Servers[0].Port, config.Host.Address, config.Host.Port); }