Examples of CandidatePacketExtension


Examples of net.java.sip.communicator.impl.protocol.jabber.extensions.jingle.CandidatePacketExtension

      if( ims == null )
        return null;
     
      for( Component c : ims.getComponents() ) {
        for( Candidate<?> can : c.getLocalCandidates() ) {
          CandidatePacketExtension candidate = new CandidatePacketExtension();
          candidate.setComponent(c.getComponentID());
          candidate.setFoundation(Integer.parseInt(can.getFoundation()));
          candidate.setGeneration(agent.getGeneration());
          candidate.setID(nextCandidateId());
          candidate.setNetwork(0); //FIXME: we need to identify the network card properly.
          TransportAddress ta = can.getTransportAddress();
          candidate.setIP( ta.getHostAddress() );
          candidate.setPort( ta.getPort() );
          candidate.setPriority(can.getPriority());
          candidate.setProtocol(can.getTransport().toString());
          if( can.getRelatedAddress() != null ) {
            candidate.setRelAddr(can.getRelatedAddress().getHostAddress());
            candidate.setRelPort(can.getRelatedAddress().getPort());
          }
          candidate.setType(convertType(can.getType()));
         
          transport.addCandidate(candidate);
        }
      }
    } catch( Exception e ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.