package io.netty.child.discard;

/**
 * Keeps sending random data to the specified address.
 */
public class DiscardClient {
	private final String host;
	private final int port;
	private final int firstMessageSize;
	
	public DiscardClient(String host, int port, int firstMessageSize) {
		this.host = host;
		this.port = port;
		this.firstMessageSize = firstMessageSize;
	}
	
	public void run() throws Exception {
		
	}
	
	public static void main(String[] args) throws Exception {
		
	}
}

@@ -26,16 +26,266 @@
 scard;%0A%0A
+import io.netty.bootstrap.Bootstrap;%0Aimport io.netty.channel.Channel;%0Aimport io.netty.channel.ChannelFuture;%0Aimport io.netty.channel.EventLoopGroup;%0Aimport io.netty.channel.nio.NioEventLoopGroup;%0Aimport io.netty.channel.socket.nio.NioSocketChannel;%0A%0A
 /**%0A * K
@@ -662,75 +662,986 @@
 %7B%0A%09%09
-%0A%09%7D%0A%09%0A%09public static void main(String%5B%5D args) throws Exception %7B%0A%09%09
+EventLoopGroup group = new NioEventLoopGroup();%0A%09%09%0A%09%09try %7B%0A%09%09%09Bootstrap b = new Bootstrap();%0A%09%09%09b.group(group)%0A%09%09%09 .channel(NioSocketChannel.class)%0A%09%09%09 .handler(new DiscardClientHandler(firstMessageSize));%0A%09%09%09%0A%09%09%09// Make the connection attempt.%0A%09%09%09ChannelFuture f = b.connect(host, port).sync();%0A%09%09%09%0A%09%09%09// Wait until the connection is closed.%0A%09%09%09f.channel().closeFuture().sync();%0A%09%09%7D%0A%09%09finally %7B%0A%09%09%09group.shutdownGracefully();%0A%09%09%7D%0A%09%7D%0A%09%0A%09public static void main(String%5B%5D args) throws Exception %7B%0A%09%09if(args.length %3C 2 %7C%7C args.length %3E 3) %7B%0A%09%09%09System.err.println(%22Usage : %22 + DiscardClient.class.getSimpleName() + %22 %3Chost%3E %3Cport%3E %5B%3Cfirst message size%3E%5D%22);%0A%09%09%09return;%0A%09%09%7D%0A%09%09%0A%09%09// Parse options.%0A%09%09final String host = args%5B0%5D;%0A%09%09final int port = Integer.parseInt(args%5B1%5D);%0A%09%09final int firstMessageSize;%0A%09%09%0A%09%09if(args.length == 3) %7B%0A%09%09%09firstMessageSize = Integer.parseInt(args%5B2%5D);%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09firstMessageSize = 256;%0A%09%09%7D%0A%09%09%0A%09%09new DiscardClient(host, port, firstMessageSize).run();
 %0A%09%7D%0A

Add DiscardClient.