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:[email protected]">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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]