PDA

View Full Version : deliverOOBMessage question



Brenn
March 18th, 2012, 17:04
Will Comm.deliverOOBMessage transmit nested tables?

Just curious. I'm just getting back into this after a long break, I know I have code to transmit tables somewhere (clunky recursive beast iirc), but this feature looked new to me and I figured I'd give it a shot. I'm thinking the answer to this is no considering an error or two I'm getting, but I thought I'd ask.

Nevermind again, I got my answer- search is your friend...

Brenn
March 21st, 2012, 03:55
Ok so now I do have a legitimate question, does the recipient list work in deliverOOBMessage?

I have a handler that is called from User.onIdentityActivation that I want to transmit a table to the client that just activated the identity (the table does contain only strings). If I try to steer it to that recipient, it sometimes works, sometimes does not (not more often than not). However if I don't include the recipient it works every time. I've been just passing the username you get as a parameter from onIdentityActivation as the recipient parameter, should I be passing something different?

I would post the code, but I would have to cull it down a bit and I'm quite tired at the moment.

Trenloe
March 21st, 2012, 16:54
I've used User.getIdentityOwner to get the recipient that is then used as the target for the message. In theory this should be the same as the recipient parameter in onIdentityActivation though...

Moon Wizard
March 23rd, 2012, 20:17
Here's the logic regarding recipients and deliverOOBMessage:

* If host, then deliver message to recipients in list. If no recipients specified, then broadcast to all clients.

* If client, then send message to host.
** If recipient value specified, then only sent to host
** If no recipients specified, then host broadcasts to all clients.

The client originated message handling is a little strange, but it sort of makes sense given the client/server nature of the program. This is how the original deliverMessage function was written, and deliverOOBMessage just mimics this behavior.

Regards,
JPG