Skip to content

Commit

Permalink
write and flush methods are provided (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes authored Apr 16, 2024
1 parent 0d576a6 commit 7c86801
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/main/java/com/alipay/remoting/RemotingContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,31 @@ public RemotingContext(ChannelHandlerContext ctx, InvokeContext invokeContext,
/**
* Wrap the writeAndFlush method.
*
* @param msg
* @return
* @param msg as msg
* @return channel future
*/
public ChannelFuture writeAndFlush(RemotingCommand msg) {
return this.channelContext.writeAndFlush(msg);
}

/**
* Wrap the write method.
*
* @param msg as msg
* @return channel future
*/
public ChannelFuture write(RemotingCommand msg) {
return this.channelContext.write(msg);
}

/**
* Wrap the write method.
*
*/
public void flush() {
this.channelContext.flush();
}

/**
* whether this request already timeout
*
Expand Down

0 comments on commit 7c86801

Please sign in to comment.