code: protected List<T> manycastSendAndReceive(DatagramSocket datagramSocket, byte[] rqstBytes, int timeout)
      {
          List<T> result = new ArrayList<T>();
  
          udpConnector.manycastSend(datagramSocket, rqstBytes);
  
          DatagramPacket packet = null;
          while ((packet = udpConnector.receive(datagramSocket, timeout)) != null)
          {
              byte[] data = new byte[packet.getLength()];
              System.arraycopy(packet.getData(), packet.getOffset(), data, 0, data.length);
              InetSocketAddress address = (InetSocketAddress)packet.getSocketAddress();
              T rply = convert(data, address);
              if (rply != null)
              {
                  rply.setResponder(address.getAddress().getHostAddress());
                  result.add(rply);
              }
          }
  
          return result;
      }
docs: Sends the given request bytes, then waits at most for the given timeout for replies.
  For each reply, sets the responder address.
  
  @param datagramSocket the socket to use to send and receive
  @param rqstBytes      the request bytes to send
  @param timeout        the max time to wait for a reply
  @return a list of replies received