[vos-d] Sending unrecognized messages to S4

Reed Hedges reed at interreality.org
Sat Feb 24 20:24:36 EST 2007


I encountered a problem in S4 just now: if you send a message to an
object for which there is no handler registered, it basically ignores
it.  If the sender happens to be waiting for a reply,
then it has to wait for the full timeout.

However, we have a fairly well defined way of replying to messages in
VOS, so it could reply with an "unhandled message" error.

E.g. the receiving Vobject can do this, I think? --


if(...Message msg not handled...) {
  Message err;
  err.setNonce(msg->getNonce());
  err.setMethod(msg->getMethod() + "-reply");  // Or maybe "core:error"
instead?
  err.insertField("error", "Unrecognized message method: " +
msg->getMethod());
  err.setType("reply"); // ?? or "update"?
  from->sendMessage(err);
}


Does this make sense?  Can I add it? (It would be in
VobjectBase::msgSendImpl() I think)

O

Reed






More information about the vos-d mailing list