private void RaiseEventPeerSecureChannelException(SecureChannelException ex) { _syncCxt.Post(PeerSecureChannelExceptionCallback, ex); }
private void _network_VirtualPeerSecureChannelException(BitChatNetwork sender, SecureChannelException ex) { if (PeerSecureChannelException != null) RaiseEventPeerSecureChannelException(ex); }
private void _chat_PeerSecureChannelException(BitChat sender, SecureChannelException ex) { string peerInfo; if (ex.PeerCertificate == null) peerInfo = "[" + ex.PeerEP.ToString() + "]"; else peerInfo = ex.PeerCertificate.IssuedTo.Name + " <" + ex.PeerCertificate.IssuedTo.EmailAddress.Address + "> [" + ex.PeerEP.ToString() + "]"; string desc; if (ex.Code == SecureChannelCode.RemoteError) desc = "RemoteError: " + (ex.InnerException as SecureChannelException).Code.ToString(); else desc = ex.Code.ToString(); AddMessage(new ChatMessageInfoItem("Secure channel with peer '" + peerInfo + "' encountered '" + desc + "' exception.", DateTime.Now)); }