Eliminated _socket_route_data_id() as a separate function, incorporating