Factorized socket binding into utility class.