30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
using Hamakaze;
|
|
using System;
|
|
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
|
|
|
|
HttpClient.Instance.DefaultUserAgent = @"SharpChat/0.9";
|
|
|
|
Database.ReadConfig();
|
|
|
|
using ManualResetEvent mre = new ManualResetEvent(false);
|
|
using SockChatServer scs = new SockChatServer(PORT);
|
|
Console.CancelKeyPress += (s, e) => { e.Cancel = true; mre.Set(); };
|
|
mre.WaitOne();
|
|
}
|
|
}
|
|
}
|