split socket logic