FutureChannelCreator fcc = sender.connectionBean().reservation().create(0, 1);
fcc.awaitUninterruptibly();
cc = fcc.channelCreator();
SendDirectBuilder sendDirectBuilder = new SendDirectBuilder(sender, (PeerAddress) null);
sendDirectBuilder.streaming();
sendDirectBuilder.idleTCPSeconds(Integer.MAX_VALUE);
byte[] me = new byte[50];
Buffer b = new Buffer(Unpooled.compositeBuffer(), 100);
b.addComponent(Unpooled.wrappedBuffer(me));
if (!wait) {
ByteBuf replyBuffer = Unpooled.buffer(50);
replyBuffer.writerIndex(50);
b.addComponent(replyBuffer);
}
sendDirectBuilder.buffer(b);
sendDirectBuilder.progressListener(new ProgressListener() {
@Override
public void progress(final Message interMediateMessage) {
if (interMediateMessage.isDone()) {
progressComplete.incrementAndGet();
System.err.println("progress 1 ? done");