private ConnectorHandler createHandlerUDP(final TargetTuple tt)
throws IOException {
final InetSocketAddress remote = tt.getSocketAddress();
final UDPConnectorHandler connectorHandler =
(UDPConnectorHandler) clientController.acquireConnectorHandler(Protocol.UDP);
try {
if (!disableUDPPortForClient) {
if (tt.getBindIP() == null || tt.getBindIP().equals("")){
connectorHandler.connect(remote, localUDPSocketAddress,
new SharedCallbackHandler(connectorHandler, tt));
} else {
connectorHandler.connect(remote, tt.getSocketBindAddress(),
new SharedCallbackHandler(connectorHandler, tt));
}
} else {
if (tt.getBindIP() == null || tt.getBindIP().equals("")){
connectorHandler.connect(remote,
new SharedCallbackHandler(connectorHandler, tt));
} else {
connectorHandler.connect(remote, tt.getSocketBindAddress(),
new SharedCallbackHandler(connectorHandler, tt));
}
}
return connectorHandler;