In a medium saucepan over medium-high heat, mix sugar, milk, butter, cocoa powder, and salt. Bring to a rolling boil, stirring occasionally. After it hits a rolling boil, boil for 1 minute and 15 seconds, stirring constantly. Take the pan off the heat, and stir in the vanilla and optional espresso powder.
1 3/4 cups sugar, 1/2 cup milk, 1/2 cup butter, 1/4 cup cocoa powder, 1/4 teaspoon salt, 1 teaspoon vanilla, 1/2 teaspoon espresso powder