{
ThrowIfDisposed();
- return ReadAsync(buffer.ToArray()).GetAwaiter().GetResult();
+ return ReadAsync(buffer.ToArray()).AsTask().GetAwaiter().GetResult();
}
internal override void Write(ReadOnlySpan<byte> buffer)
ThrowIfDisposed();
// TODO: optimize this.
- WriteAsync(buffer.ToArray()).GetAwaiter().GetResult();
+ WriteAsync(buffer.ToArray()).AsTask().GetAwaiter().GetResult();
}
// MsQuic doesn't support explicit flushing
memberName, // method name
message); // message
- private async ValueTask SendSettingsAsync()
+ private async Task SendSettingsAsync()
{
try
{
while (buffer.Length != 0)
{
// Sync over async here -- QUIC implementation does it per-I/O already; this is at least more coarse-grained.
- if (_responseDataPayloadRemaining <= 0 && !ReadNextDataFrameAsync(response, CancellationToken.None).GetAwaiter().GetResult())
+ if (_responseDataPayloadRemaining <= 0 && !ReadNextDataFrameAsync(response, CancellationToken.None).AsTask().GetAwaiter().GetResult())
{
// End of stream.
break;