move process ICE candidate messaging to separate function