split socket specific code