LLUUID recipient_id = // UUID of object B LLMessageSystem* msg = // create a new message object // fill in the message data msg->addUUID("sender", A->getID()); msg->addUUID("recipient", recipient_id); msg->addString("message", "Hello from A!"); // send the message reliably gMessageSystem->sendReliable(msg);
LLUUID recipient_id = // UUID of object B LLMessageSystem* msg = // create a new message object // fill in the message data msg->addUUID("sender", A->getID()); msg->addUUID("recipient", recipient_id); msg->addString("request", "Can you send me your inventory?"); // send the message reliably gMessageSystem->sendReliable(msg);This example sends a request message from object A to object B. The message contains the UUID of the sender, the UUID of the recipient, and a request string. The sendReliable method is used to ensure that the message is delivered reliably. Package library: Second Life Viewer In conclusion, the LLMessageSystem sendReliable method is a useful feature provided by the LLMessageSystem library in the Second Life virtual world. It ensures that messages are delivered reliably between objects, and can be used for simple message passing or more complex requests and responses.