In a medium saucepan, combine the milk, sugar, cocoa powder, and salt. Whisk thoroughly until the cocoa is fully dissolved into the cold milk.
Place the saucepan over medium heat and bring the mixture to a gentle simmer, whisking occasionally to prevent the bottom from scorching.
Once the milk is steaming, gradually rain in the semolina flour while whisking constantly to prevent any lumps from forming.
Continue to cook the mixture over medium-low heat, stirring continuously with a spatula, for about 5 to 7 minutes. You will notice the pudding thickening significantly as the semolina grains hydrate and swell.
Remove the pan from the heat and stir in the vanilla extract and butter, if using, until the mixture is glossy and smooth.
Pour the pudding into individual bowls or a single serving dish.
Serve immediately for a warm, soft consistency, or refrigerate for at least 2 hours if you prefer a firmer, chilled dessert.