For the base: Whisk together the milk, sugar, cocoa, cornstarch, vanilla and a pinch of salt in a medium saucepan. Cook over medium-high heat, whisking constantly, until the mixture boils, about 2 minutes. Reduce the heat to medium, and continue whisking until thickened, about 30 seconds more.