In a medium, heat-proof bowl, whisk the egg yolks for about 1 minute, until light yellow and increased in volume. Whisk in the cornstarch and about 1/4 cup of the milk. Whisk until smooth and set aside.
In a medium saucepan, combine the remaining milk, sugar, cocoa, and salt. Set the pan over medium-high heat and "scald" the mixture, which means heat until little bubbles appear around the edges of the pan - before the liquid comes to a boil. Remove the pan from the heat.
While whisking the eggs, very gradually add the hot milk mixture - the goal is to heat (temper) the eggs slowly, not scramble them.
Return the milk-egg mixture to the pan, set the pan over medium heat and bring to a boil, whisking constantly.
Reduce the heat to low and simmer for 1 to 2 minutes, until the mixture thickens, whisking constantly.
Remove the pan from the heat and whisk in the vanilla.
Transfer the pudding to a bowl, cover with plastic, and press the plastic onto the surface of the pudding to prevent a "skin" from forming. Refrigerate until chilled.