When using the dispatch handler and message_attach (no resmgr_attach),
how big is the buffer use to receive the messages. Will parsing the
_msg_info
give me that info?
I’m trying to figure out if/when MsgRead() needs to be called.
- Mario
When using the dispatch handler and message_attach (no resmgr_attach),
how big is the buffer use to receive the messages. Will parsing the
_msg_info
give me that info?
I’m trying to figure out if/when MsgRead() needs to be called.
Mario Charest <mcz@videotron.ca> wrote:
When using the dispatch handler and message_attach (no resmgr_attach),
how big is the buffer use to receive the messages. Will parsing the
_msg_info
give me that info?
Given …
static int
message_handler(message_context_t *ctp, int code, unsigned flags, void *handle)
… it is in ctp->msg_max_size.
I’m trying to figure out if/when MsgRead() needs to be called.
Note also that ctp->info.msglen is the number of bytes actually
received.
- Mario
“Steven Dufresne” <stevend@qnx.com> wrote in message
news:8qt0c5$7km$1@inn.qnx.com…
Mario Charest <> mcz@videotron.ca> > wrote:
When using the dispatch handler and message_attach (no resmgr_attach),
how big is the buffer use to receive the messages. Will parsing the
_msg_info
give me that info?Given …
static int
message_handler(message_context_t *ctp, int code, unsigned flags, void
*handle)… it is in ctp->msg_max_size.
Ok.
Where did it got set (dipatch_alloc?), anyway to change it?
I’m trying to figure out if/when MsgRead() needs to be called.
Note also that ctp->info.msglen is the number of bytes actually
received.
- Mario
Mario Charest <mcz@videotron.ca> wrote:
“Steven Dufresne” <> stevend@qnx.com> > wrote in message
news:8qt0c5$7km$> 1@inn.qnx.com> …
Mario Charest <> mcz@videotron.ca> > wrote:When using the dispatch handler and message_attach (no resmgr_attach),
how big is the buffer use to receive the messages. Will parsing the
_msg_info
give me that info?Given …
static int
message_handler(message_context_t *ctp, int code, unsigned flags, void
*handle)… it is in ctp->msg_max_size.
Ok.Where did it got set (dipatch_alloc?), anyway to change it?
message_attr_t mattr;
memset (&mattr, 0, sizeof (mattr));
mattr.msg_max_size = XXX;
message_attach (dpp, &mattr, MSGTYPE, MSGTYPE, message_handler, NULL);
If you are attaching anything else (resmgr_attach()),
you want to make sure that you do the above message_attach()
first. Seems to be the first xxx_attr_t (message_attr_t or
resmgr_attr_t) to be passed through using an xxx_attach() wins
in terms of the maximum message size.
You can only be sure that you will get at least the size
you ask for. You could actually end up with more due to the needs
of the library.
I’m trying to figure out if/when MsgRead() needs to be called.
Note also that ctp->info.msglen is the number of bytes actually
received.
- Mario