本文整理汇总了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();
}
示例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();
}