public void Dispose() { _tcpClient.GetStream().Close(); _tcpClient.Dispose(); _tcpServer.Stop(); }
public void Run() { var applicationArguments = _applicationArgumentsGetter.GetApplicationArguments(); var loggingSystem = _loggingSystemInitializer.Initialize( applicationArguments.FirstOrDefault(x => x.Key.Id == CommandLineArgument.LoggingConfigurationFile)); if (loggingSystem == null) { return; } using (loggingSystem) { Configuration.Configuration configuration; if (_configurationReader.Read(out configuration) == false) { return; } if (_tcpServer.Start(configuration.Binds, _httpRequestProcessor) == false) { return; } Console.WriteLine("Press any key to stop the application."); Console.ReadKey(); _tcpServer.Stop(); } }
public void Stop() { // stop tcp server Server.Stop(); // stop command line interpreter commandLineInterpreter?.Stop(); }
public void Stop() { _tcpServer.Stop(); _mqttBrocker.Stop(); //MQTT publisher stopping _sysMonitorsPool.StopServices(); }
private Boolean ExecuteStopState(ref ITcpServer server, Object[] args) { if (server == null) { System.Console.WriteLine("Server instance is null"); return(false); } server.Stop(true); _currentState = MachineState.Stopped; System.Console.WriteLine("=================> Server was stoped"); return(true); }
private void Stop_button_Click(object sender, EventArgs e) { _server.Stop(); if (_usbServer != null) { _usbServer.Stop(); } MessageBox.Show("Server Stopped"); Status_label.ForeColor = Color.Red; Status_label.Text = "Stop"; Start_button.Enabled = true; Stop_button.Enabled = false; }
/// <summary> /// The Function sends CLOSE command (requesting to close the server) /// </summary> public void SendCommand() { m_handlerManager.ServerClosing(); m_TCPServer.Stop(); }