!752 static double sleepTime = 10; // seconds !include #1006054 // ContactInvisibles concepts. concept IP { S ip; bool myIP, aware; long lastCheck, lastSeenAware; S computerID; new Set pastComputerIDs; } static L myIPs; static ContactInvisibles contactInvisibles; p { contactInvisibles = new ContactInvisibles; myIPs = getMyIPs(); startAwareness(); conceptsAndBot(); while licensed { pcall { for (S ip : getPeersListFrom("localhost")) checkIP(ip); contactInvisibles.doIt(); } sleepSeconds(sleepTime); } } svoid checkIP(S ipAddress) { if (isLoopbackIP(ipAddress)) ret; IP ip = uniq(IP, ip := ipAddress); cset(ip, myIP := myIPs.contains(ipAddress)); long time = now(); if (isAware(ipAddress)) cset(ip, aware := true, lastSeenAware := time); else cset(ip, aware := false); cset(ip, lastCheck := time); if (ip.aware) try { cset(ip, computerID := matchOK(sendToAwareness(ip.ip, "get computer id"))); ip.pastComputerIDs.add(ip.computerID); } catch e { printShortException(e); cset(ip, computerID := null); } printConcept(ip); }