Made Socket preferred connection method. Randomized closed_htmlpage command