In a saucepan, thoroughly combine the cornstarch, sugar, and cocoa. Add the milk and stir until very smooth. Cook on medium heat, stirring constantly, until the pudding comes to a boil. Then lower the heat and gently simmer, stirring continuously, for 3 or 4 minutes.
Stir in the vanilla, pour the hot pudding into a decorative serving bowl or individual custard cups, and serve warm or chill for about 2 hours, until cold and set.