code: @Override
      public void run() {
  
          // Set a suitable thread name
          if (threadName == null || threadName.isEmpty()) {
              threadName = String.format("Modbus UDP Listener [port:%d]", port);
          }
          Thread.currentThread().setName(threadName);
  
          ModbusUDPTransport transport;
          try {
              if (address == null) {
                  terminal = new UDPSlaveTerminal(InetAddress.getByAddress(new byte[]{0, 0, 0, 0}));
              }
              else {
                  terminal = new UDPSlaveTerminal(address);
              }
              terminal.setTimeout(timeout);
              terminal.setPort(port);
              terminal.activate();
              transport = new ModbusUDPTransport(terminal);
          }
  
          // Catch any fatal errors and set the listening flag to false to indicate an error
          catch (Exception e) {
              error = String.format("Cannot start UDP listener - %s", e.getMessage());
              listening = false;
              return;
          }
  
          listening = true;
          try {
              while (listening) {
                  handleRequest(transport, this);
              }
          }
          catch (ModbusIOException ex1) {
              if (!ex1.isEOF()) {
                  logger.error("Exception occurred before EOF while handling request", ex1);
              }
          }
          finally {
              try {
                  terminal.deactivate();
                  transport.close();
              }
              catch (Exception ex) {
                  // ignore
              }
          }
      }
docs: Starts this <tt>ModbusUDPListener</tt>.