Beispiel #1
0
        protected override void OnStart(string[] args)
        {
            Thread thread = new Thread(
                p =>
            {
                try
                {
                    EasyServer server = new EasyServer();
                    server.ListenTcp();
                }
                catch (Exception ex)
                {
                    EventLog.WriteEntry(ex.Message);
                    throw;
                }
            });

            thread.IsBackground = true;
            thread.Start();
        }