private void StartServer() { if (ServerX.IsRunning) { ServerX.Stop(); } ServerX.Start(); Console.WriteLine("Socket server X has been started!"); }
public void StopServer() { if (ServerX.IsRunning) { ServerX.Stop(); Console.WriteLine("Socket server X has been stopped!"); } if (ServerY != null && ServerY.IsRunning) { ServerY.Stop(); Console.WriteLine("Socket server Y has been stopped!"); } }