Added /shutdown and /restart commands for server maintenance.
This commit is contained in:
parent
e6dffe06e6
commit
6f50ec66a9
3 changed files with 49 additions and 12 deletions
|
@ -22,7 +22,7 @@ namespace SharpChat {
|
|||
Database.ReadConfig();
|
||||
|
||||
using ManualResetEvent mre = new ManualResetEvent(false);
|
||||
using SockChatServer scs = new SockChatServer(PORT);
|
||||
using SockChatServer scs = new SockChatServer(mre, PORT);
|
||||
Console.CancelKeyPress += (s, e) => { e.Cancel = true; mre.Set(); };
|
||||
mre.WaitOne();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue