msglength

This returns the length of msgId's data.

msglength msgId