added generic socket type so I can shoehorn in SSL