示例#1
0
文件: Server.cs 项目: Phyyl/WebServer
        public void Start(bool async = false)
        {
            token = new FlagToken();

            if (async)
            {
                Task.Run(StartAsync);
            }
            else
            {
                StartAsync().Wait();
            }
        }
示例#2
0
文件: Server.cs 项目: Phyyl/WebServer
 public void Stop()
 {
     token.Set();
     token = null;
 }