Read a message from a client
#include <sys/iofunc.h> #include <sys/resmgr.h> int resmgr_msgread( resmgr_context_t * ctp, void * msg, int size, int offset );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The resmgr_msgread() function is a convenience function that you should in a resource manager instead of MsgRead().
You'll use resmgr_msgread() when you handle combine messages, where the offset of the rest of the message that's to be read is additionally offset by previous combine message elements. For more information, see “Layers in a resource manager” in the Bones of a Resource Manager chapter of Writing a Resource Manager.
The same values as MsgRead(): the number of bytes read, or -1 if an error occurs (errno is set).
MsgRead(), resmgr_context_t, resmgr_msgreadv(), resmgr_msgreply(), resmgr_msgreplyv(), resmgr_msgwrite(), resmgr_msgwritev()
“Layers in a resource manager” in the Bones of a Resource Manager chapter of Writing a Resource Manager
Resource Managers chapter of Getting Started with QNX Neutrino