public void receive(State<?> state) {
System.out.println("STATE " + state);
seen.add(state.stateType());
if (state.get() instanceof HttpContent) {
HttpContent content = (HttpContent) state.get();
ByteBuf bb = content.copy().content();
System.out.println("CHUNK " + bb.readableBytes() + " bytes");
} else if (state.get() instanceof HttpResponse) {
// System.out.println("HEADERS: " + ((HttpResponse) state.get()).headers());
// for (Map.Entry<String,String> e : ((HttpResponse) state.get()).headers().entries()) {
// System.out.println(e.getKey() + ": " + e.getValue());