Meninges
The pia's capillaries are lined with cells that are packed very closely together.  Only certain things can get through these cells and reach the brain.  This helps block things like bacteria and some poisons from getting into the brain.  It also lets in the things that the brain needs to survive, like glucose (sugar), water, and white blood cells (which fight infection).