Skip to content

Commit

Permalink
default WriteAndFlushAsync returns Task
Browse files Browse the repository at this point in the history
  • Loading branch information
maksimkim committed Apr 11, 2018
1 parent afa606f commit eb3bdbc
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/DotNetty.Transport/Channels/AbstractChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/DotNetty.Transport/Channels/DefaultChannelPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/DotNetty.Transport/Channels/IChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public interface IChannel : IAttributeMap, IComparable<IChannel>

IChannel Flush();

ValueTask WriteAndFlushAsync(object message);
Task WriteAndFlushAsync(object message);

ValueTask WriteAndFlushAsync(object message, bool notifyComplete);
}
Expand Down
2 changes: 1 addition & 1 deletion src/DotNetty.Transport/Channels/IChannelHandlerContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public interface IChannelHandlerContext : IAttributeMap

IChannelHandlerContext Flush();

ValueTask WriteAndFlushAsync(object message);
Task WriteAndFlushAsync(object message);

ValueTask WriteAndFlushAsync(object message, bool notifyComplete);

Expand Down
2 changes: 1 addition & 1 deletion src/DotNetty.Transport/Channels/IChannelPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ public interface IChannelPipeline : IEnumerable<IChannelHandler>
/// <summary>
/// Shortcut for calling both <see cref="WriteAsync"/> and <see cref="Flush"/>.
/// </summary>
ValueTask WriteAndFlushAsync(object msg);
Task WriteAndFlushAsync(object msg);

ValueTask WriteAndFlushAsync(object msg, bool notifyComplete);
}
Expand Down

0 comments on commit eb3bdbc

Please sign in to comment.