sharp-chat/SharpChat/Program.cs

31 lines
1.2 KiB
C#
Raw Permalink Normal View History

using SharpChat.Flashii;
2022-08-30 15:00:58 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
2022-08-30 15:00:58 +00:00
using System.Threading;
namespace SharpChat {
public class Program {
public const ushort PORT = 6770;
public static void Main(string[] args) {
Console.WriteLine(@" _____ __ ________ __ ");
Console.WriteLine(@" / ___// /_ ____ __________ / ____/ /_ ____ _/ /_");
Console.WriteLine(@" \__ \/ __ \/ __ `/ ___/ __ \/ / / __ \/ __ `/ __/");
Console.WriteLine(@" ___/ / / / / /_/ / / / /_/ / /___/ / / / /_/ / /_ ");
Console.WriteLine(@"/____/_/ /_/\__,_/_/ / .___/\____/_/ /_/\__,_/\__/ ");
Console.WriteLine(@" / _/ Sock Chat Server");
#if DEBUG
Console.WriteLine(@"============================================ DEBUG ==");
#endif
2022-08-30 15:28:46 +00:00
Database.ReadConfig();
2022-08-30 15:00:58 +00:00
using ManualResetEvent mre = new ManualResetEvent(false);
using SockChatServer scs = new SockChatServer(mre, PORT);
2022-08-30 15:00:58 +00:00
Console.CancelKeyPress += (s, e) => { e.Cancel = true; mre.Set(); };
mre.WaitOne();
}
}
}