code: public void handleDatagram (InetSocketAddress source, DatagramChannel channel,
          ByteBuffer buf, long when)
      {
          // lazily create our various bits and bobs
          if (_digest == null) {
              try {
                  _digest = MessageDigest.getInstance("MD5");
              } catch (NoSuchAlgorithmException nsae) {
                  log.warning("Missing MD5 algorithm.");
                  return;
              }
              _sequencer = _pcmgr.createDatagramSequencer();
          }
  
          // verify the hash
          buf.position(12);
          _digest.update(buf);
          byte[] hash = _digest.digest(_datagramSecret);
          buf.position(4);
          for (int ii = 0; ii < 8; ii++) {
              if (hash[ii] != buf.get()) {
                  log.warning("Datagram failed hash check", "id", _connectionId, "source", source);
                  return;
              }
          }
  
          // update our target address
          _datagramAddress = source;
          _datagramChannel = channel;
  
          // read the contents through the sequencer
          try {
              Message msg = _sequencer.readDatagram();
              if (msg == null) {
                  return; // received out of order
              }
              msg.received = when;
              _handler.handleMessage(msg);
  
          } catch (ClassNotFoundException cnfe) {
              log.warning("Error reading datagram", "error", cnfe);
  
          } catch (IOException ioe) {
              log.warning("Error reading datagram", "error", ioe);
          }
      }
docs: Processes a datagram sent to this connection.