Commented out unnecessary configuration
This commit is contained in:
parent
1912930e01
commit
a59862e8d1
@ -26,7 +26,6 @@ import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import org.jboss.netty.bootstrap.ClientBootstrap;
|
||||
import org.jboss.netty.buffer.DirectChannelBufferFactory;
|
||||
import org.jboss.netty.channel.ChannelFactory;
|
||||
import org.jboss.netty.channel.ChannelFuture;
|
||||
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
|
||||
@ -70,11 +69,11 @@ public class DiscardClient {
|
||||
ClientBootstrap bootstrap = new ClientBootstrap(factory);
|
||||
DiscardClientHandler handler = new DiscardClientHandler(firstMessageSize);
|
||||
|
||||
//bootstrap.getPipeline().addLast("executor", new ExecutionHandler(new MemoryAwareThreadPoolExecutor(16, 0, 0)));
|
||||
//bootstrap.getPipeline().addLast("executor", new ExecutionHandler(new OrderedMemoryAwareThreadPoolExecutor(16, 0, 0)));
|
||||
bootstrap.getPipeline().addLast("handler", handler);
|
||||
bootstrap.setOption("tcpNoDelay", true);
|
||||
bootstrap.setOption("keepAlive", true);
|
||||
bootstrap.setOption("bufferFactory", DirectChannelBufferFactory.getInstance());
|
||||
//bootstrap.setOption("bufferFactory", DirectChannelBufferFactory.getInstance());
|
||||
|
||||
// Start the connection attempt.
|
||||
ChannelFuture future = bootstrap.connect(new InetSocketAddress(host, port));
|
||||
|
@ -26,7 +26,6 @@ import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import org.jboss.netty.bootstrap.ServerBootstrap;
|
||||
import org.jboss.netty.buffer.DirectChannelBufferFactory;
|
||||
import org.jboss.netty.channel.ChannelFactory;
|
||||
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
|
||||
|
||||
@ -53,7 +52,7 @@ public class DiscardServer {
|
||||
bootstrap.getPipeline().addLast("handler", handler);
|
||||
bootstrap.setOption("child.tcpNoDelay", true);
|
||||
bootstrap.setOption("child.keepAlive", true);
|
||||
bootstrap.setOption("child.bufferFactory", DirectChannelBufferFactory.getInstance());
|
||||
//bootstrap.setOption("child.bufferFactory", DirectChannelBufferFactory.getInstance());
|
||||
|
||||
// Bind and start to accept incoming connections.
|
||||
bootstrap.bind(new InetSocketAddress(8080));
|
||||
|
Loading…
x
Reference in New Issue
Block a user