private void ReceiveFromServerCompleted(object sender, SocketAsyncEventArgs e) { if (e.SocketError != SocketError.Success) { e.Completed -= ReceiveFromServerCompleted; (e as SocketArgs).IsInUse = false; Utilities.WriteToLog($"Socket closed in ComputerHub: {e.SocketError.ToString()}"); Pages.Hub.Current.RefreshUICall(); return; } SocketMessageHandler.ProcessSocketArgs(e, ReceiveFromServerCompleted, TcpClient.Client); }
private static void ReceiveFromServerCompleted(object sender, SocketAsyncEventArgs e) { if (e.SocketError != SocketError.Success) { e.Completed -= ReceiveFromServerCompleted; (e as SocketArgs).IsInUse = false; Utilities.WriteToLog($"Socket closed in AditService: {e.SocketError.ToString()}"); SessionID = String.Empty; return; } SocketMessageHandler.ProcessSocketArgs(e, ReceiveFromServerCompleted, TcpClient.Client); }
private static void ReceiveFromServerCompleted(object sender, SocketAsyncEventArgs e) { if (e.SocketError != SocketError.Success) { e.Completed -= ReceiveFromServerCompleted; (e as SocketArgs).IsInUse = false; Utilities.WriteToLog($"Socket closed in AditViewer: {e.SocketError.ToString()}"); MainWindow.Current.Dispatcher.Invoke(() => { MainWindow.Current.WindowState = WindowState.Normal; }); Pages.Viewer.Current.RefreshUICall(); return; } SocketMessageHandler.ProcessSocketArgs(e, ReceiveFromServerCompleted, TcpClient.Client); }
private static void ReceiveFromServerCompleted(object sender, SocketAsyncEventArgs e) { if (e.SocketError != SocketError.Success) { e.Completed -= ReceiveFromServerCompleted; (e as SocketArgs).IsInUse = false; Utilities.WriteToLog($"Socket closed in AditClient: {e.SocketError.ToString()}"); if (Config.Current.StartupMode == Config.StartupModes.Notifier) { Environment.Exit(0); return; } SessionID = String.Empty; Pages.Client.Current.RefreshUICall(); return; } SocketMessageHandler.ProcessSocketArgs(e, ReceiveFromServerCompleted, TcpClient.Client); }