private void setAcceptedLocalCandidate ( TransportCandidate bestLocalCandidate ) { for ( int i = 0 ; i < resolver . getCandidateCount ( ) ; i ++ ) { // TODO FIX The EQUAL Sentence if ( resolver . getCandidate ( i ) . getIp ( ) . equals ( bestLocalCandidate . getIp ( ) ) && resolver . getCandidate ( i ) . getPort ( ) == bestLocalCandidate . getPort ( ) ) { acceptedLocalCandidate = resolver . getCandidate ( i ) ; return ; } } LOGGER . fine ( "BEST: ip=" + bestLocalCandidate . getIp ( ) + " port=" + bestLocalCandidate . getPort ( ) + " has not been offered." ) ; // throw new XMPPException("Local transport candidate has not be offered."); }
Set the best local transport candidate we have offered and accepted by the other endpoint .