AaltoTLS.SecureSession.EndReceive C# (CSharp) Méthode

EndReceive() public méthode

public EndReceive ( IAsyncResult asyncResult ) : byte[]
asyncResult IAsyncResult
Résultat byte[]
        public byte[] EndReceive(IAsyncResult asyncResult)
        {
            AsyncReceiveDataResult asyncReceiveResult = (AsyncReceiveDataResult)asyncResult;
            if (!asyncReceiveResult.IsCompleted) {
                asyncReceiveResult.AsyncWaitHandle.WaitOne();
            }

            if (asyncReceiveResult.CompletedWithException) {
                throw asyncReceiveResult.AsyncException;
            }
            return asyncReceiveResult.AsyncResult;
        }