Hi
I have a method to connect to a UDP server,
private void connect(String hostname, int port) {
logger.debug("Entered connect()");
NioDatagramConnector connector = new NioDatagramConnector();
ConnectFuture future = connector.connect(new
InetSocketAddress(hostname, port));
future.awaitUninterruptibly();
future.addListener(new IoFutureListener<ConnectFuture>() {
public void operationComplete(ConnectFuture future) {
if (future.isConnected()) {
logger.debug("...connected");
} else {
logger.error("Not connected...exiting");
}
}
});
logger.debug("Exiting connect()");
}
when run without starting any UDP server (on Windows XP), the program prints
the following on the console
Entered connect()
...connected
Exiting connect()
Why future.isConnected() returned true while there isn't any server running?
--
Hez