((DefaultPipeline) stunPipeline).setInitialByteBufferSize(4096);
((DefaultPipeline) stunPipeline).setByteBufferType(ByteBufferType.HEAP);
stunPipeline.setMaxQueueSize(-1);
stunPipeline.initPipeline();
UDPSelectorHandler stunHandler = new UDPSelectorHandler();
stunHandler.setPort(DEFAULT_STUN_PORT);
try {
stunHandler.setInet(InetAddress.getByName(DEFAULT_STUN_LISTEN_ADDRESS));
} catch (UnknownHostException ue) {
ue.printStackTrace();
}
stunHandler.setReuseAddress(true);
stunHandler.setLogger(logger);
ProtocolChainInstanceHandler instanceHandler =
new SimpleProtocolChainInstanceHandler(protocolChain);
stunController.setProtocolChainInstanceHandler(instanceHandler);