当前位置: 首页>>代码示例>>Java>>正文


Java ICENegociator.gatherCandidateAddresses方法代码示例

本文整理汇总了Java中de.javawi.jstun.test.demo.ice.ICENegociator.gatherCandidateAddresses方法的典型用法代码示例。如果您正苦于以下问题:Java ICENegociator.gatherCandidateAddresses方法的具体用法?Java ICENegociator.gatherCandidateAddresses怎么用?Java ICENegociator.gatherCandidateAddresses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.javawi.jstun.test.demo.ice.ICENegociator的用法示例。


在下文中一共展示了ICENegociator.gatherCandidateAddresses方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import de.javawi.jstun.test.demo.ice.ICENegociator; //导入方法依赖的package包/类
public void initialize() throws XMPPException {
    if (!isResolving() && !isResolved()) {
        LOGGER.fine("Initialized");

        // Negotiation with a STUN server for a set of interfaces is quite slow, but the results
        // never change over then instance of a JVM.  To increase connection performance considerably
        // we now cache established/initialized negotiators for each STUN server, so that subsequent uses
        // of the STUN server are much, much faster.
        if (negociatorsMap.get(server) == null) {
        	ICENegociator iceNegociator = new ICENegociator(server, port, (short) 1);
        	negociatorsMap.put(server, iceNegociator);
        	
        	// gather candidates
        	iceNegociator.gatherCandidateAddresses();
        	// priorize candidates
        	iceNegociator.prioritizeCandidates();
        }

    }
    this.setInitialized();
}
 
开发者ID:TTalkIM,项目名称:Smack,代码行数:22,代码来源:ICEResolver.java

示例2: initialize

import de.javawi.jstun.test.demo.ice.ICENegociator; //导入方法依赖的package包/类
public void initialize() throws XMPPException {
    if (!isResolving() && !isResolved()) {
        LOGGER.debug("Initialized");

        // Negotiation with a STUN server for a set of interfaces is quite slow, but the results
        // never change over then instance of a JVM.  To increase connection performance considerably
        // we now cache established/initialized negotiators for each STUN server, so that subsequent uses
        // of the STUN server are much, much faster.
        if (negociatorsMap.get(server) == null) {
        	ICENegociator iceNegociator = new ICENegociator(server, port, (short) 1);
        	negociatorsMap.put(server, iceNegociator);
        	
        	// gather candidates
        	iceNegociator.gatherCandidateAddresses();
        	// priorize candidates
        	iceNegociator.prioritizeCandidates();
        }

    }
    this.setInitialized();
}
 
开发者ID:bejayoharen,项目名称:java-bells,代码行数:22,代码来源:ICEResolver.java


注:本文中的de.javawi.jstun.test.demo.ice.ICENegociator.gatherCandidateAddresses方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。