From 9575e8a7d2ce56ce4c31e210ec8732eb6f09f424 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 28 Feb 2012 23:47:06 +0100 Subject: [PATCH] Added comment on flow control policy. --- .../java/org/eclipse/jetty/spdy/StandardStream.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java b/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java index 0e6dd067c16..55b3da9183c 100644 --- a/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java +++ b/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java @@ -201,6 +201,16 @@ public class StandardStream implements IStream public void consume(int delta) { super.consume(delta); + + // This is the algorithm for flow control. + // This method may be called multiple times + // with delta=1, but we only send a window + // update when the whole dataInfo has been + // consumed. + // Other policies may be to send window + // updates when consumed() is greater than + // a certain threshold, etc. but for now + // the policy is not pluggable for simplicity. if (consumed() == length() && !isClosed()) windowUpdate(length()); }