<div>Hi</div><div><br></div><div>Here is my UDP client snippet,</div><div><br></div><div> ChannelFactory factory = new OioDatagramChannelFactory(Executors.newCachedThreadPool());</div><div> ClientBootstrap bootstrap = new ClientBootstrap(factory);</div>
<div> ChannelPipeline pipeline = bootstrap.getPipeline();</div><div> pipeline.addLast("logger", new LoggingHandler());</div><div><br></div><div> // connect to a non-exist IP address or port<br>
</div><div> ChannelFuture future = bootstrap.connect(new InetSocketAddress("localhost", 8899));</div><div> future.awaitUninterruptibly();</div><div> Channel channel = future.getChannel();</div>
<div><br></div><div> // channel.isConnected() returned true?<br></div><div> logger.debug("channel.isConnected() returned {}", channel.isConnected());</div><div><br></div><div><br></div><div>when run, the channel.isConnected() returned true even though there is no server listening at localhost:8899.<br>
</div><div><br></div><div>Is this an expected behavior?</div><div><br></div><br>-- <br><br>Hez<br>