In a medium saucepan, whisk together the sugar, cocoa powder, cornstarch and salt. Whisk in the milk and bring to a boil, stirring, over medium-high heat. Lower the heat to medium and cook, stirring, until thickened, about 5 minutes.
Remove the pot from the heat and stir in the chocolate and vanilla until smooth. Serve warm or chilled.