In a large saucepan off of heat, whisk together the sugar, cocoa and cornstarch. Gradually pour in 1/2 cup of the milk, whisking constantly until there are no more lumps, then slowly whisk in remaining milk.
Place saucepan on stove over medium heat and bring to a boil, watching closely as it can rise up and bubble over. Reduce to a simmer and cook for 2 minutes more, pulling the saucepan off of heat if the milk is rising to the top.
Remove from heat and whisk in chocolate until melted. Stir in salt and vanilla extract. Serve topped with a dollop of whipped cream or marshmallows.