Пример #1
0
 public void Stop()
 {
     try
     {
         Logger.Warn("Stopping server...");
         Socket.Stop();
         Logger.Success("Server stopped!");
     }
     catch (Exception ex)
     {
         Logger.Error("An error occurred while stopping the server!", ex);
     }
 }
Пример #2
0
 public void Start()
 {
     try
     {
         Logger.Info("Starting server...");
         Socket.Start();
         Logger.Success("Server started on ANY (localhost / " + (NetUtils.GetExternalIp() ?? "external") + ")!");
     }
     catch (Exception ex)
     {
         Logger.Error("An error occurred while starting the server!", ex);
     }
 }