Replace comm::Duplex with a custom type with lookahead