public MessageData multiplex(final Capability cap, final MessageData messageToSend) {
    final int offset = null == cap ? 0 : capabilityOffsets.get(cap);
    return offsetMessageCode(messageToSend, offset);
  }
Prepares a message to send by offsetting its code based on the agreed capabilities.

@param cap The capability (protocol) associated with this message.
@param messageToSend The message to send.
@return Returns message with the correctly offset code.
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/rlpx/wire/CapabilityMultiplexer.java