Skip to content

Commit

Permalink
added specific OpenSim test code
Browse files Browse the repository at this point in the history
  • Loading branch information
giodegas committed Sep 22, 2014
1 parent e8e43ca commit 5a7681c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions os-redis-sharp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -925,3 +925,30 @@ public object [] ToArgs ()
return args.ToArray ();
}
}

// just to output a string to the viewer console
void debug(string msg){
llOwnerSay("debug: "+msg);
}

// MAIN Script that uses the Redis server

string message = "Hello avatar!";
string REDIS_IP = "192.168.1.111";

public void default_event_state_entry()
{
debug(message);
}

public void default_event_touch_start(
LSL_Types.LSLInteger total_number)
{
Redis R = new Redis(REDIS_IP);
var info = R.GetInfo ();
foreach (var k in info.Keys) {
llSay(0, (string)k+" "+ info[k]);
}
string value = R.GetString("T3:status");
debug(value);
}

0 comments on commit 5a7681c

Please sign in to comment.