Skip to content

[API Proposal]: [QUIC] Make CompleteWritesAsync #103434

@ManickaP

Description

@ManickaP

Background and motivation

System.Net.Quic is still in Preview, before we un-preview it, we'd like to change this method to an async one.
https://learn.microsoft.com/en-us/dotnet/api/system.net.quic.quicstream.completewrites?view=net-8.0

API Proposal

namespace System.Net.Quic;

// Existing class.
public class QuicStream : Stream
{
-    void CompleteWrites();
+    ValueTask CompleteWritesAsync();
}

API Usage

await using var quicStream = await connection.OpenStreamAsync(...);
// Use the stream...
await quicStream.CompleteWritesAsync();

Alternative Designs

Keeping it not-async and use existing Task WritesClosed property.

Risks

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions