port = server.bind(port);
DrillbitEndpoint ep = DrillbitEndpoint.newBuilder().setAddress("localhost").setBitPort(port).build();
registry.setEndpoint(ep);
for(int i =0; i < 10; i++){
try(BitConnectionManager cm = new BitConnectionManager(ep, ep, handler, c, listeners)){
SendFragmentStatus cmd = new SendFragmentStatus(FragmentStatus.getDefaultInstance());
cm.runCommand(cmd);
cmd.getFuture().checkedGet();
}
}
System.out.println("connected");
}