Mix cocoa, cornstarch, beaten egg yolks, sugar and salt, then add milk gradually, while stirring in a pot over med-high heat on your stovetop.
Cook until thick, beating it smooth.
Stir continuously for 10-15 minutes, using a heavy bottom pan.
Keep stirring until it thickens, then add vanilla after you take off the heat.
Pour into a pre-baked pie shell.
Put in the fridge to chill.
Add whipped cream if desired, or use the left over egg whites for a meringue topping.