示例#1
0
 private void MethodStartServer()
 {
     try
     {
         string HereIp   = ServerVali.IP;
         int    HereProt = ServerVali.Port;
         server = new IOCPServer(IPAddress.Parse(HereIp), HereProt, 1024);
         server.Start();
         SerilogHelper.Log4Debug("The Server is Start ....", Outputoption.Info);
         this.SettingBtn.Enabled = false;
     }
     catch (Exception ex)
     {
         SerilogHelper.Log4Debug(ex.Message, Outputoption.Error);
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.SettingBtn.Enabled = true;
     }
 }
示例#2
0
 public void Start()
 {
     _server.Start();
     _q.StartServer(10);
 }