static void Main(string[] args) { server.Port = 8000; server.Listening(); if (server.IsListening) { server.Received += new UdpEventHandler(server_Received); } Console.ReadKey(); }