Report question

Question: how do i find an available port before bind the socket with the endpoint?