Generic socket support