Programatically Identify the best Ingest Server

Thanks … Can you please help me on how to send the test stream . May be a small code will be helpful … I am newbie to rtmp protocol. ?