this is the correct way to get the CString length. [payload length] is not correct.