public void Disconnected() { try { if (LV != null) { if (Program.form1.listView1.InvokeRequired) { Program.form1.listView1.BeginInvoke((MethodInvoker)(() => { LV.Remove(); })); } lock (Settings.Online) Settings.Online.Remove(this); } } catch { } try { ClientSslStream?.Close(); ClientSocket?.Close(); ClientSslStream?.Dispose(); ClientSocket?.Dispose(); ClientMS?.Dispose(); } catch { } }
private void EndAuthenticate(IAsyncResult ar) { try { ClientSslStream.EndAuthenticateAsServer(ar); ClientBuffer = new byte[4]; ClientMS = new MemoryStream(); ClientSslStream.BeginRead(ClientBuffer, 0, ClientBuffer.Length, ReadClientData, null); } catch { ClientSslStream?.Dispose(); ClientSocket?.Dispose(); } }
private void EndAuthenticate(IAsyncResult ar) { try { ClientSslStream.EndAuthenticateAsServer(ar); ClientBuffer = new byte[4]; ClientMS = new MemoryStream(); ClientSslStream.BeginRead(ClientBuffer, 0, ClientBuffer.Length, ReadClientData, null); } catch { //Settings.Blocked.Add(ClientSocket.RemoteEndPoint.ToString().Split(':')[0]); ClientSslStream?.Dispose(); ClientSocket?.Dispose(); } }
public void SslStream() { ClientSslStream.Dispose(); TcpClient.Dispose(); }
protected sealed override void IterationCleanupSslStream() { ClientSslStream.Dispose(); TcpClient.Dispose(); }