Package org.ice4j

Examples of org.ice4j.TransportAddress


          stunAddresses = null ;
        } else {
          stunAddresses = new TransportAddress[stunRecords.length];
          for( int i=0; i<stunRecords.length; ++i ) {
            SRVRecord srv = (SRVRecord) stunRecords[i] ;
            stunAddresses[i] = new TransportAddress(srv.getTarget().toString().replaceFirst("\\.$", ""), srv.getPort(), Transport.UDP);
          }
        }
        if( turnRecords == null ) {
          turnAddresses = null ;
        } else {
          turnAddresses = new TransportAddress[stunRecords.length];
          for( int i=0; i<turnAddresses.length; ++i ) {
            SRVRecord srv = (SRVRecord) turnRecords[i] ;
            turnAddresses[i] = new TransportAddress(srv.getTarget().toString().replaceFirst("\\.$", ""), srv.getPort(), Transport.UDP);
          }
        }
      }

      private Record[] lookupSrv(String query) throws TextParseException {
View Full Code Here


                ia = InetAddress.getByName(cpe.getIP());
              } catch (UnknownHostException uhe) {
                continue;
              }

              TransportAddress relatedAddr = null;
              if (cpe.getRelAddr() != null && cpe.getRelPort() != -1) {
                relatedAddr = new TransportAddress(cpe.getRelAddr(), cpe.getRelPort(), Transport.parse(cpe.getProtocol().toLowerCase()));
              }

              Component component = ims.getComponent(cpe.getComponent());
              if (component != null) {
                // we should always be able to find this if there is one b/c of the sorting we did.
                RemoteCandidate relatedCandidate = relatedAddr != null ? component.findRemoteCandidate(relatedAddr) : null;
                TransportAddress ta = new TransportAddress(ia, cpe.getPort(), Transport.parse(cpe.getProtocol().toLowerCase()));
                RemoteCandidate rc = new RemoteCandidate( ta,
                    component,
                    convertType(cpe.getType()),
                    Integer.toString(cpe.getFoundation()),
                    cpe.getPriority(),
View Full Code Here

          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());
View Full Code Here

TOP

Related Classes of org.ice4j.TransportAddress

Copyright © 2018 www.massapicom. 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.