protected void CompleteReceiveAsyncResult() { #if SECURE_BLACKBOX_DEBUG LowLevelDump("ElSSLSocket.CompleteReceiveAsyncResult() {}"); #endif lock (this) { SSLSocketAsyncResult res = beginReceiveAsyncResult; if (res != null) { beginReceiveAsyncResult = null; res.Completed(innerException); res = null; innerException = null; } else if (beginConnectAsyncResult != null) { res = beginConnectAsyncResult; beginConnectAsyncResult = null; res.Completed(innerException); res = null; innerException = null; } else if (beginOpenSSLSessionAsyncResult != null) { res = beginOpenSSLSessionAsyncResult; beginOpenSSLSessionAsyncResult = null; res.Completed(innerException); res = null; innerException = null; } } }
protected void SetOpenSSLSessionAsyncResult(SSLSocketAsyncResult ar) { #if SECURE_BLACKBOX_DEBUG LowLevelDump("ElSSLSocket.SetOpenSSLSessionAsyncResult() {}"); #endif lock (this) { beginOpenSSLSessionAsyncResult = ar; } }
public void EndOpenSSLSession(IAsyncResult asyncResult) { #if SECURE_BLACKBOX_DEBUG LowLevelDump("ElSSLSocket.EndOpenSSLSession() {}"); #endif SSLSocketAsyncResult ar = (SSLSocketAsyncResult)asyncResult; ar.AsyncWaitHandle.WaitOne(); if (ar.Exception != null) { throw ar.Exception; } }
protected virtual void InnerEndConnect(IAsyncResult asyncResult) { #if SECURE_BLACKBOX_DEBUG LowLevelDump("ElSSLSocket.InnerEndConnect() {}"); #endif SSLSocketAsyncResult ar = (SSLSocketAsyncResult)asyncResult; ar.AsyncWaitHandle.WaitOne(); if (ar.Exception != null) { throw ar.Exception; } }
protected void CompleteOpenSSLSessionAsyncResult() { #if SECURE_BLACKBOX_DEBUG LowLevelDump("ElSSLSocket.CompleteOpenSSLSessionAsyncResult() {}"); #endif lock (this) { if (beginOpenSSLSessionAsyncResult != null) { beginOpenSSLSessionAsyncResult.Completed(innerException); beginOpenSSLSessionAsyncResult = null; innerException = null; } } }
virtual protected void Reset() { #if SECURE_BLACKBOX_DEBUG LowLevelDump("ElSSLSocket.Reset() {"); #endif lock (this) { innerException = null; opened = false; closed = false; inBufferDataPresent = false; inBufferIndex = 0; transportBeginReceiveCalled = false; beginConnectAsyncResult = null; beginSendAsyncResult = null; beginReceiveAsyncResult = null; } #if SECURE_BLACKBOX_DEBUG LowLevelDump("ElSSLSocket.Reset() }"); #endif }