code: protected DownstreamMessage receiveDatagram ()
          throws IOException
      {
          // clear the buffer and read a datagram
          _buf.clear();
          int size = readDatagram(_buf);
          if (size <= 0) {
              throw new IOException("No datagram available to read.");
          }
          _buf.flip();
  
          // decode through the sequencer
          try {
              DownstreamMessage msg = (DownstreamMessage)_sequencer.readDatagram();
              if (_client != null) {
                  _client.getMessageTracker().messageReceived(
                      true, size, msg, (msg == null) ? 0 : _sequencer.getMissedCount());
              }
              if (msg == null) {
                  return null; // received out of order
              }
              if (debugLogMessages()) {
                  log.info("DATAGRAM " + msg);
              }
              return msg;
  
          } catch (ClassNotFoundException cnfe) {
              throw (IOException) new IOException(
                  "Unable to decode incoming datagram.").initCause(cnfe);
          }
      }
docs: Reads a datagram from the socket (blocking until a datagram has arrived).