-- Integration-test helper: connect, send a hello frame, then ignore every -- request until the deadline expires. Used to prove the bridge's per-computer -- probe timeout path. local args = {...}; local id = tonumber(args[1]) or 99; local label = args[2] or "silent"; local urlBase = args[3] or "ws://127.0.0.1:2001"; local duration = tonumber(args[4]) or 5; local url = urlBase .. "/?id=" .. id; local ws, err = http.websocket(url); if not ws then print("websocket failed: " .. tostring(err)); os.shutdown(); return; end ws.send(textutils.serializeJSON({ type = "hello", computerId = id, computerLabel = label, })); sleep(duration); pcall(function() ws.close(); end); os.shutdown();