I have two endpoints behind firewalls who can only communicate through an external relay/proxy.
I’m going to stream video frames from one endpoint to the relay to the other endpoint. It doesn’t matter if frames are lost – the main requirement is that latency is as low as possible. Frame order is also fairly important.
Which would be best suited to this, UDP or TCP? What additional considerations would I need to make if I used UDP? Are there any other better suited protocols/libraries I could use? I’m doing this from Java.
From you description (frame order is not significant, some frames can be dropped) – UDP (or protocol based on UDP) is an ideal candidate. Here’s some information about various protocols that can be used to stream live video