private CheckCompletionBeforeNextReceive ( |
||
message | ||
asyncRequest | AsyncProtocolRequest | |
return | void |
private static void WriteCallback(IAsyncResult transportResult) { if (!transportResult.CompletedSynchronously) { AsyncProtocolRequest asyncState = (AsyncProtocolRequest)transportResult.AsyncState; SslState asyncObject = (SslState)asyncState.AsyncObject; try { asyncObject.InnerStream.EndWrite(transportResult); object obj2 = asyncState.AsyncState; Exception exception = obj2 as Exception; if (exception != null) { throw exception; } asyncObject.CheckCompletionBeforeNextReceive((ProtocolToken)obj2, asyncState); } catch (Exception exception2) { if (asyncState.IsUserCompleted) { throw; } asyncObject.FinishHandshake(exception2, asyncState); } } }