/// <summary> /// Constructor. /// </summary> protected ScsClientBase() { _pingTimer = new Timer(30000); _pingTimer.Elapsed += PingTimer_Elapsed; ConnectTimeout = DefaultConnectionAttemptTimeout; WireProtocol = WireProtocolManager.GetDefaultWireProtocol(); }
/// <summary> /// Constructor. /// /// </summary> protected ScsClientBase() { this._pingTimer = new Timer(30000); this._pingTimer.Elapsed += new EventHandler(this.PingTimer_Elapsed); this.ConnectTimeout = 15000; this.WireProtocol = WireProtocolManager.GetDefaultWireProtocol(); }
/// <summary> /// Creates a new ClientReConnecter object. /// It is not needed to start ClientReConnecter since it automatically /// starts when the client disconnected. /// /// </summary> /// <param name="client">Reference to client object</param><exception cref="T:System.ArgumentNullException">Throws ArgumentNullException if client is null.</exception> public ClientReConnecter(IConnectableClient client) { if (client == null) throw new ArgumentNullException("client"); this._client = client; this._client.Disconnected += new EventHandler(this.Client_Disconnected); this._reconnectTimer = new Timer(20000); this._reconnectTimer.Elapsed += new EventHandler(this.ReconnectTimer_Elapsed); this._reconnectTimer.Start(); }
/// <summary> /// Creates a new ClientReConnecter object. /// It is not needed to start ClientReConnecter since it automatically /// starts when the client disconnected. /// </summary> /// <param name="client">Reference to client object</param> /// <exception cref="ArgumentNullException">Throws ArgumentNullException if client is null.</exception> public ClientReConnecter(IConnectableClient client) { if (client == null) { throw new ArgumentNullException("client"); } _client = client; _client.Disconnected += Client_Disconnected; _reconnectTimer = new Timer(20000); _reconnectTimer.Elapsed += ReconnectTimer_Elapsed; _reconnectTimer.Start(); }