void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { if (e.Client.IsConnected) { StatusGet(); } }
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); if (e.Client.IsConnected) { // Tasks on connect } }
private void tcpClient_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { if (e.Client.IsConnected) { this.isConnected = true; foreach (var item in SimplClients) { item.Value.Fire(new SimplEventArgs(eElkSimplEventIds.IsConnected, "true", 1)); } foreach (var item in SimplClients) { item.Value.Fire(new SimplEventArgs(eElkSimplEventIds.IsRegistered, "true", 1)); } if (this.responseQueueTimer == null) { this.responseQueueTimer = new CTimer(ResponseQueueDequeue, null, 0, 100); } else { responseQueueTimer.Reset(0, 100); } if (this.commandQueueTimer == null) { this.commandQueueTimer = new CTimer(CommandQueueDequeue, null, 0, 100); } else { commandQueueTimer.Reset(0, 100); } this.InitializePanelParameters(); } else if (!e.Client.IsConnected) { this.SendDebug("Elk Disconnected"); this.isConnected = false; this.commandQueueTimer.Stop(); this.commandQueue.Clear(); this.responseQueueTimer.Stop(); this.responseQueue.Clear(); foreach (var item in SimplClients) { item.Value.Fire(new SimplEventArgs(eElkSimplEventIds.IsRegistered, "false", 0)); item.Value.Fire(new SimplEventArgs(eElkSimplEventIds.IsConnected, "false", 0)); } } }
private void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs args) { if (ConnectFeedback != null) { ConnectFeedback.FireUpdate(); } if (StatusFeedback != null) { StatusFeedback.FireUpdate(); } }
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { StatusFeedback.FireUpdate(); ConnectedFeedback.FireUpdate(); if (e.Client.IsConnected) { // Tasks on connect } else { // Cleanup items from this session } }
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); if (e.Client.IsConnected) { //SubscribeToAttributes(); } else { // Cleanup items from this session _commandQueue.Clear(); _commandQueueInProgress = false; } }
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); if (e.Client.IsConnected) { // Tasks on connect } else { // Cleanup items from this session if (SubscriptionTimer != null) { SubscriptionTimer.Stop(); SubscriptionTimer = null; } isSubscribed = false; CommandQueue.Clear(); CommandQueueInProgress = false; } }
void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e) { Debug.Console(2, this, "Socket Status Change: {0}", e.Client.ClientStatus.ToString()); if (e.Client.IsConnected) { OnlineStatus = true; OnlineFeedback.FireUpdate(); } else { OnlineStatus = false; OnlineFeedback.FireUpdate(); if (SubscriptionTimer != null) { SubscriptionTimer.Stop(); SubscriptionTimer = null; } isSubscribed = false; CommandQueue.Clear(); CommandQueueInProgress = false; } }