Note: This makes 4 servings, but the ervings are conservative. I would recommend doubling the recipe if more than two or three people.
Mix together sugar, cornstarch, salt, and cocoa in a medium saucepan. Slowly whisk in milk. Bring to a simmer over medium-high heat, stirring nearly constantly.
Meanwhile, whisk egg yolks and vanilla in a bowl. When the milk mixture reaches a simmer, gradually whisk about a cup of the hot milk mixture into the egg mixture.
Return the milk/yolk mixture to the saucepan and cook over medium-high heat, whisking constantly, until the pudding comes to a full boil. Reduce the heat to maintain a simmer, and continue whisking until thick, about 2 or 3 minutes more.
Remove from heat and add butter and vanilla. Strain mixture, using a spatula to force through the strainer, discarding any solids. Pour the pudding into 4 small cups. Cover with plastic wrap and refrigerate for at least 4 hours or overnight until set.