コード例 #1
0
        /// <summary>
        /// Flushes all headers and sets the length to the amount of data currently buffered in the output
        /// </summary>
        /// <param name="token">The cancellation token to use</param>
        /// <returns>An awaitable task</returns>
        internal async Task FlushAndSetLengthAsync(CancellationToken token)
        {
            // Make sure any buffered data is flushed
            if (m_wrappedoutstream != m_outstream)
            {
                await m_wrappedoutstream.FlushAsync(token);
            }

            await m_outstream.SetLengthAndFlushAsync(true, token);
        }
コード例 #2
0
ファイル: HttpResponse.cs プロジェクト: pha3z/ceenhttpd
        /// <summary>
        /// Flushes all headers and sets the length to the amount of data currently buffered in the output
        /// </summary>
        /// <returns>The and set length async.</returns>
        internal async Task FlushAndSetLengthAsync()
        {
            // Make sure any
            if (m_wrappedoutstream != m_outstream)
            {
                await m_wrappedoutstream.FlushAsync();
            }

            await m_outstream.SetLengthAndFlushAsync(true);
        }
コード例 #3
0
ファイル: HttpResponse.cs プロジェクト: hc4/ceenhttpd
 /// <summary>
 /// Flushes all headers and sets the length to the amount of data currently buffered in the output
 /// </summary>
 /// <returns>The and set length async.</returns>
 internal Task FlushAndSetLengthAsync()
 {
     return(m_outstream.SetLengthAndFlushAsync(true));
 }