JETTY-1245

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2361 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-10-19 01:46:42 +00:00
parent 236a0c3b86
commit bda68489b9
2 changed files with 8 additions and 4 deletions

View File

@ -42,6 +42,7 @@ import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ThreadLocalBuffers;
import org.eclipse.jetty.io.bio.SocketEndPoint;
import org.eclipse.jetty.io.nio.DirectNIOBuffer;
import org.eclipse.jetty.io.nio.IndirectNIOBuffer;
import org.eclipse.jetty.io.nio.SelectChannelEndPoint;
import org.eclipse.jetty.io.nio.SslSelectChannelEndPoint;
import org.eclipse.jetty.io.nio.SelectorManager.SelectSet;
@ -601,14 +602,16 @@ public class SslSelectChannelConnector extends SelectChannelConnector implements
@Override
protected Buffer newBuffer(int size)
{
// TODO indirect?
return new DirectNIOBuffer(size);
if (getUseDirectBuffers())
return new DirectNIOBuffer(size);
return new IndirectNIOBuffer(size);
}
@Override
protected Buffer newHeader(int size)
{
// TODO indirect?
return new DirectNIOBuffer(size);
if (getUseDirectBuffers())
return new DirectNIOBuffer(size);
return new IndirectNIOBuffer(size);
}
@Override
protected boolean isHeader(Buffer buffer)

View File

@ -47,6 +47,7 @@ public class SslSelectChannelServerTest extends HttpServerTestBase
connector.setKeyPassword("keypwd");
connector.setTruststore(keystorePath);
connector.setTrustPassword("storepwd");
connector.setUseDirectBuffers(true);
startServer(connector);