In a saucepan, whisk together sugar, cocoa powder, cornstarch and salt. Over medium heat, pour in milk and whisk until smooth. Continually cooking, stirring constantly until mixture is thicken. This should take 5-8 minutes.
When thick, remove from heat and stir butter and vanilla. Let the mixture cool 10-15 minutes and serve warm or cover and place in refrigerate until you are ready to eat.