platform specific socket setup