public virtual int Receive(byte[] buf, int off, int len, int waitMillis) { try { return(mRecordLayer.Receive(buf, off, len, waitMillis)); } catch (TlsFatalAlert fatalAlert) { mRecordLayer.Fail(fatalAlert.AlertDescription); throw fatalAlert; } catch (IOException e) { mRecordLayer.Fail(AlertDescription.internal_error); throw e; } catch (Exception e) { mRecordLayer.Fail(AlertDescription.internal_error); throw new TlsFatalAlert(AlertDescription.internal_error, e); } }
internal virtual void AbortClientHandshake(ClientHandshakeState state, DtlsRecordLayer recordLayer, byte alertDescription) { recordLayer.Fail(alertDescription); InvalidateSession(state); }