use new centralized socket code