Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
commit
adbe5c58a1
|
@ -109,6 +109,8 @@ public class HTTP2Client extends ContainerLifeCycle
|
|||
private int maxFrameLength = Frame.DEFAULT_MAX_LENGTH;
|
||||
private int maxConcurrentPushedStreams = 32;
|
||||
private int maxSettingsKeys = SettingsFrame.DEFAULT_MAX_KEYS;
|
||||
private int maxDynamicTableSize = 4096;
|
||||
private int maxHeaderBlockFragment = 0;
|
||||
private FlowControlStrategy.Factory flowControlStrategyFactory = () -> new BufferingFlowControlStrategy(0.5F);
|
||||
private long streamIdleTimeout;
|
||||
private boolean useInputDirectByteBuffers = true;
|
||||
|
@ -312,6 +314,28 @@ public class HTTP2Client extends ContainerLifeCycle
|
|||
this.maxSettingsKeys = maxSettingsKeys;
|
||||
}
|
||||
|
||||
@ManagedAttribute("The HPACK dynamic table maximum size")
|
||||
public int getMaxDynamicTableSize()
|
||||
{
|
||||
return maxDynamicTableSize;
|
||||
}
|
||||
|
||||
public void setMaxDynamicTableSize(int maxDynamicTableSize)
|
||||
{
|
||||
this.maxDynamicTableSize = maxDynamicTableSize;
|
||||
}
|
||||
|
||||
@ManagedAttribute("The max size of header block fragments")
|
||||
public int getMaxHeaderBlockFragment()
|
||||
{
|
||||
return maxHeaderBlockFragment;
|
||||
}
|
||||
|
||||
public void setMaxHeaderBlockFragment(int maxHeaderBlockFragment)
|
||||
{
|
||||
this.maxHeaderBlockFragment = maxHeaderBlockFragment;
|
||||
}
|
||||
|
||||
@ManagedAttribute("Whether to use direct ByteBuffers for reading")
|
||||
public boolean isUseInputDirectByteBuffers()
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ public class HTTP2ClientConnectionFactory implements ClientConnectionFactory
|
|||
@SuppressWarnings("unchecked")
|
||||
Promise<Session> promise = (Promise<Session>)context.get(SESSION_PROMISE_CONTEXT_KEY);
|
||||
|
||||
Generator generator = new Generator(byteBufferPool);
|
||||
Generator generator = new Generator(byteBufferPool, client.getMaxDynamicTableSize(), client.getMaxHeaderBlockFragment());
|
||||
FlowControlStrategy flowControl = client.getFlowControlStrategyFactory().newFlowControlStrategy();
|
||||
HTTP2ClientSession session = new HTTP2ClientSession(scheduler, endPoint, generator, listener, flowControl);
|
||||
session.setMaxRemoteStreams(client.getMaxConcurrentPushedStreams());
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.eclipse.jetty.io.EndPoint;
|
|||
import org.eclipse.jetty.io.ManagedSelector;
|
||||
import org.eclipse.jetty.io.SelectorManager;
|
||||
import org.eclipse.jetty.io.SocketChannelEndPoint;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.annotation.ManagedAttribute;
|
||||
import org.eclipse.jetty.util.annotation.ManagedObject;
|
||||
import org.eclipse.jetty.util.annotation.Name;
|
||||
|
@ -338,6 +339,7 @@ public class ServerConnector extends AbstractNetworkConnector
|
|||
}
|
||||
catch (BindException e)
|
||||
{
|
||||
IO.close(serverChannel);
|
||||
throw new IOException("Failed to bind to " + bindAddress, e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue