code: private DatagramChannel openUdpChannel(InetAddress localAddress, int port, Selector selector) throws IOException {
  		DatagramChannel channel = DatagramChannel.open();
  		channel.configureBlocking(false);
  		// Register selector for reading operations
  		channel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE);
  		channel.bind(new InetSocketAddress(localAddress, port));
  		return channel;
  	}
docs: Opens a datagram channel and binds it to an address.
  
  @param localAddress
  The address to bind the channel to.
  @param port
  The port to use
  @return The bound datagram channel
  @throws IOException
  When an error occurs while binding the datagram channel.