本文整理汇总了Java中de.javawi.jstun.test.demo.ice.ICENegociator类的典型用法代码示例。如果您正苦于以下问题:Java ICENegociator类的具体用法?Java ICENegociator怎么用?Java ICENegociator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ICENegociator类属于de.javawi.jstun.test.demo.ice包,在下文中一共展示了ICENegociator类的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();
}