From eb3bdbc82949447167307417796e6fe5d2fbe9c3 Mon Sep 17 00:00:00 2001 From: Maxim Kim Date: Wed, 11 Apr 2018 10:36:33 -0700 Subject: [PATCH] default WriteAndFlushAsync returns Task --- src/DotNetty.Transport/Channels/AbstractChannel.cs | 2 +- .../Channels/AbstractChannelHandlerContext.cs | 2 +- src/DotNetty.Transport/Channels/DefaultChannelPipeline.cs | 2 +- src/DotNetty.Transport/Channels/IChannel.cs | 2 +- src/DotNetty.Transport/Channels/IChannelHandlerContext.cs | 2 +- src/DotNetty.Transport/Channels/IChannelPipeline.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/DotNetty.Transport/Channels/AbstractChannel.cs b/src/DotNetty.Transport/Channels/AbstractChannel.cs index 3ec1cd41b..92496b2ec 100644 --- a/src/DotNetty.Transport/Channels/AbstractChannel.cs +++ b/src/DotNetty.Transport/Channels/AbstractChannel.cs @@ -191,7 +191,7 @@ public IChannel Read() public ValueTask WriteAsync(object msg) => this.pipeline.WriteAsync(msg); - public ValueTask WriteAndFlushAsync(object message) => this.pipeline.WriteAndFlushAsync(message); + public Task WriteAndFlushAsync(object message) => this.pipeline.WriteAndFlushAsync(message); public ValueTask WriteAndFlushAsync(object message, bool notifyComplete) => this.pipeline.WriteAndFlushAsync(message, notifyComplete); diff --git a/src/DotNetty.Transport/Channels/AbstractChannelHandlerContext.cs b/src/DotNetty.Transport/Channels/AbstractChannelHandlerContext.cs index d374b77e8..10036c5fa 100644 --- a/src/DotNetty.Transport/Channels/AbstractChannelHandlerContext.cs +++ b/src/DotNetty.Transport/Channels/AbstractChannelHandlerContext.cs @@ -856,7 +856,7 @@ void InvokeFlush0() } } - public ValueTask WriteAndFlushAsync(object message) => this.WriteAndFlushAsync(message, true); + public Task WriteAndFlushAsync(object message) => this.WriteAndFlushAsync(message, true).AsTask(); public ValueTask WriteAndFlushAsync(object message, bool notifyComplete) { diff --git a/src/DotNetty.Transport/Channels/DefaultChannelPipeline.cs b/src/DotNetty.Transport/Channels/DefaultChannelPipeline.cs index 71dbfe5df..3186fc3e6 100644 --- a/src/DotNetty.Transport/Channels/DefaultChannelPipeline.cs +++ b/src/DotNetty.Transport/Channels/DefaultChannelPipeline.cs @@ -830,7 +830,7 @@ public IChannelPipeline Flush() return this; } - public ValueTask WriteAndFlushAsync(object msg) => this.tail.WriteAndFlushAsync(msg); + public Task WriteAndFlushAsync(object msg) => this.tail.WriteAndFlushAsync(msg); public ValueTask WriteAndFlushAsync(object msg, bool notifyComplete) => this.tail.WriteAndFlushAsync(msg, notifyComplete); diff --git a/src/DotNetty.Transport/Channels/IChannel.cs b/src/DotNetty.Transport/Channels/IChannel.cs index 5e910b1c0..786c3042e 100644 --- a/src/DotNetty.Transport/Channels/IChannel.cs +++ b/src/DotNetty.Transport/Channels/IChannel.cs @@ -66,7 +66,7 @@ public interface IChannel : IAttributeMap, IComparable IChannel Flush(); - ValueTask WriteAndFlushAsync(object message); + Task WriteAndFlushAsync(object message); ValueTask WriteAndFlushAsync(object message, bool notifyComplete); } diff --git a/src/DotNetty.Transport/Channels/IChannelHandlerContext.cs b/src/DotNetty.Transport/Channels/IChannelHandlerContext.cs index b96a197a3..b3e17749d 100644 --- a/src/DotNetty.Transport/Channels/IChannelHandlerContext.cs +++ b/src/DotNetty.Transport/Channels/IChannelHandlerContext.cs @@ -71,7 +71,7 @@ public interface IChannelHandlerContext : IAttributeMap IChannelHandlerContext Flush(); - ValueTask WriteAndFlushAsync(object message); + Task WriteAndFlushAsync(object message); ValueTask WriteAndFlushAsync(object message, bool notifyComplete); diff --git a/src/DotNetty.Transport/Channels/IChannelPipeline.cs b/src/DotNetty.Transport/Channels/IChannelPipeline.cs index db8939784..270ad3eea 100644 --- a/src/DotNetty.Transport/Channels/IChannelPipeline.cs +++ b/src/DotNetty.Transport/Channels/IChannelPipeline.cs @@ -694,7 +694,7 @@ public interface IChannelPipeline : IEnumerable /// /// Shortcut for calling both and . /// - ValueTask WriteAndFlushAsync(object msg); + Task WriteAndFlushAsync(object msg); ValueTask WriteAndFlushAsync(object msg, bool notifyComplete); }