public void Start() { if (_active) { return; } _active = true; OnActiveUpdate(); if (_mode == TcpMode.Server) { _server = new ACTServer(_plugin); _server.Close += OnClose; _server.Start(); } else if (_mode == TcpMode.Client) { _client = new ACTClient(_plugin); _client.Close += OnClose; _client.Start(); } }
public void Stop() { if (!_active) { return; } if (_mode == TcpMode.Server) { if (_server != null) { _server.Stop(); } _server = null; } else if (_mode == TcpMode.Client) { if (_client != null) { _client.Stop(); } _client = null; } }
public void Stop() { if (!_active) return; if (_mode == TcpMode.Server) { if(_server != null) _server.Stop(); _server = null; } else if (_mode == TcpMode.Client) { if(_client != null) _client.Stop(); _client = null; } }
public void Start() { if (_active) return; _active = true; OnActiveUpdate(); if (_mode == TcpMode.Server) { _server = new ACTServer(_plugin); _server.Close += OnClose; _server.Start(); } else if(_mode == TcpMode.Client) { _client = new ACTClient(_plugin); _client.Close += OnClose; _client.Start(); } }