Пример #1
0
 /// <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();
 }
Пример #2
0
 /// <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();
 }