Put all the ingredients except the vanilla, into a heavy-based pan.
Heat slowly, stirring all the time, until the sugar has dissolved and the butter has melted.
Increase the heat and slowly bring to a boil.
Boil steadily without stirring for 15-20 minutes, until a little of the mixture can be rolled into a soft ball between your finger and thumb when dropped into cold water (115°C|238°F on a sugar thermometer).
Remove from the heat and stir in the vanilla.
Allow to stand for 5 minutes, then beat well until the mixture 'grains' and becomes thick and creamy and loses its gloss.