tomaswolf commented on code in PR #217: URL: https://github.com/apache/mina-sshd/pull/217#discussion_r857178603
########## sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelAsyncOutputStream.java: ########## @@ -282,4 +435,43 @@ public boolean isSendChunkIfRemoteWindowIsSmallerThanPacketSize() { public void setSendChunkIfRemoteWindowIsSmallerThanPacketSize(boolean sendChunkIfRemoteWindowIsSmallerThanPacketSize) { this.sendChunkIfRemoteWindowIsSmallerThanPacketSize = sendChunkIfRemoteWindowIsSmallerThanPacketSize; } + + // Marker type to avoid repeated buffering + private static class BufferedFuture extends IoWriteFutureImpl { + + BufferedFuture(Object id, Buffer buffer) { + super(id, buffer); + } + } + + // Collects state variables; access is always synchronized on the single instance per stream. + private static class WriteState { Review Comment: Done. ########## sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java: ########## @@ -42,6 +43,19 @@ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public class ChannelOutputStream extends OutputStream implements java.nio.channels.Channel, ChannelHolder { + + private enum WriteState { + BUFFERED, + NEED_FLUSH, + NEED_SPACE + } + + private enum OpenState { Review Comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org