Regular DatagramSocket works fine... ICE4J DatagramSocket seems to truncate data!?
The sending size packet is 2,500 but the receiving end is always 1500 (with regular Java DatagramSocket the receive packet size is the same as the send size).
Receive End:
Component rtpComponent = stream.getComponent(org.ice4j.ice.Component.RTCP);
CandidatePair rtpPair = rtpComponent.getSelectedPair();
videoDS = rtpPair.getDatagramSocket();
In a Thread:
byte[] buffer = new byte[250000000];
final DatagramPacket dp = new DatagramPacket(buffer, buffer.length);
videoDS.receive(dp);
final byte[] clone = new byte[dp.getLength()];
System.arraycopy(dp.getData(), dp.getOffset(), clone, 0, dp.getLength());
final Image image = new Image(new ByteArrayInputStream(clone));
The sending side is pretty much the same except it is run on an Android...
The only difference between non-working code is that the first paragraph is used for Sending and Receiving. If I use a regular Java Socket it will work (but of course not behind routers, which is why I am using Ice4J).