PostSendCommandProcessing() private method

private PostSendCommandProcessing ( Stream &stream ) : bool
stream Stream
return bool
示例#1
0
        /// <summary>
        ///    <para>Provides a wrapper for the async write operations</para>
        /// </summary>
        private static void WriteCallback(IAsyncResult asyncResult)
        {
            CommandStream connection = (CommandStream)asyncResult.AsyncState;

            try {
                try {
                    connection.EndWrite(asyncResult);
                }
                catch (IOException) {
                    connection.MarkAsRecoverableFailure();
                    throw;
                }
                catch {
                    throw;
                }
                Stream stream = null;
                if (connection.PostSendCommandProcessing(ref stream))
                {
                    return;
                }
                connection.ContinueCommandPipeline();
            } catch (Exception e) {
                connection.Abort(e);
            }
        }
示例#2
0
        private static void WriteCallback(IAsyncResult asyncResult)
        {
            CommandStream asyncState = (CommandStream)asyncResult.AsyncState;

            try
            {
                try
                {
                    asyncState.EndWrite(asyncResult);
                }
                catch (IOException)
                {
                    asyncState.MarkAsRecoverableFailure();
                    throw;
                }
                catch
                {
                    throw;
                }
                Stream stream = null;
                if (!asyncState.PostSendCommandProcessing(ref stream))
                {
                    asyncState.ContinueCommandPipeline();
                }
            }
            catch (Exception exception)
            {
                asyncState.Abort(exception);
            }
        }