[Opensim-users] llOpenRemoteDataChannel

Americo Damasceno adamascj at gmail.com
Sun Nov 1 10:35:21 UTC 2009


Maybe this can be a solution to you. It's a comm OpenSim->HTTP server:

string NAME  = "";           // name to look up - optional

key    reqid;                               // http request id

default {
    touch_start(integer total_number){
         llSay(0,"type a word on chat");
  llListen(0,"","","");

    }
    listen(integer channel,string name, key id,string message){
    llSay(0,"the word: "+message + " will go to the server.");

    string URL   = "http://www.dmu.com/croquet/echo.aspx?thename="+message;
        reqid = llHTTPRequest( URL , [], "" );
}

    http_response(key id, integer status, list meta, string body) {
        if ( id != reqid )
            return;
        if ( status == 499 )
            llSay(0,"name2key request timed out");
        else if ( status != 200 )
            llSay(0,"the internet exploded!!");
        else if ( (key)body == NULL_KEY )
            llSay(0,"No key found for " + NAME);
        else
            llSay(0,NAME + "answer from the server: " + body );
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20091101/8dd165ae/attachment.html>


More information about the Opensim-users mailing list