Heat the milk in a medium sized pot over medium heat. Mix the sugar, flour, salt, and cocoa. Ad to the milk and cook until thick, stirring continually. Beat the egg yolks with a folk, temper the pudding by adding a small amount of the hot milk mixture into the egg yolks and stirring. Combine the egg yolk mixture with the pudding base by stirring continually. Cook for at least two minutes. Stir in vanilla and place into a pie shell. When the chocolate base cools you can top with Cool Whip, or Whipped Heavy Cream.