// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Test a self-directed link message roundtrip // Not compiled or tested in-world // Setup: Use a spare owned test object. Use a spare prim without unrelated message handlers. Touch once and wait for the response. // Stop / restore: Disable/remove. Tests report privately and do not change visual prim properties. Any temporary timer stops at completion or timeout. // Notes: Custom numeric code and generated key reduce accidental collisions. This measures event-loop delivery, not network latency. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Runtime verification, not pre-certified behavior. integer CODE=1847319; key request; string payload; float started; default { touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner()||request!=NULL_KEY)return; request=llGenerateKey(); payload="incoprea-loopback|"+(string)request; started=llGetTime(); llMessageLinked(LINK_THIS,CODE,payload,request); llSetTimerEvent(5.0); } link_message(integer sender,integer code,string text,key id) { if(code!=CODE||id!=request||request==NULL_KEY)return; llSetTimerEvent(0.0); llOwnerSay("Loopback exact="+(string)(text==payload)+" elapsed="+(string)(llGetTime()-started)); request=NULL_KEY; } timer() { llSetTimerEvent(0.0); if(request!=NULL_KEY)llOwnerSay("No correlated loopback within five seconds."); request=NULL_KEY; } changed(integer flags) { if(flags&CHANGED_OWNER)llResetScript(); } }