In a medium-sized bowl, whisk together the eggs, sugar, salt and cornflour (US: cornstarch) until the mixture is smooth.
In a medium-sized saucepan on medium-high heat, warm the cream and vanilla (if using) until it comes to a gentle simmer.
Remove the pan from the heat.
Slowly pour about half of the warm cream into the egg mixture, whisking as you do so.
Then pour the egg mixture into the pan with the rest of the cream.
Return the pan to the stove on medium-high heat.
Continue whisking until the custard starts to thicken substantially. It should be the consistency of a thick yoghurt, but it will thicken more as it cools.
Place a fine sieve over a large bowl.
Transfer the custard to the sieve.
Use a large spoon or spatula to push the custard through the sieve. This step will remove any lumps and overcooked egg from the custard, and which will give you a silky smooth custard.
Cover the surface of the custard with a layer of plastic wrap, which will prevent a skin from forming on the custard as it cools.
Place the custard in the fridge to cool and firm up, at least 2 hours or overnight.