[Opensim-users] llOpenRemoteDataChannel
Clive Gould
cliveg at gmail.com
Sun Nov 1 18:49:23 UTC 2009
Hi Americo
Thanks very much for this script, which I have just tried out and it
works fine :)
In is an excellent proof of princple, but it is the opposite of what I
am looking for.
In your script the call to the external server is instigated from the
LSL script and the waiting remote server responds accordingly.
What I am looking for is the opposite i.e. Where the call is
instigated by the remote server and the waiting LSL script responds
accordingly.
Any examples welcomed...
Thanks
Clive
On Sun, Nov 1, 2009 at 6:42 PM, Clive Gould <cliveg at gmail.com> wrote:
> 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 );
> }
> }
>
More information about the Opensim-users
mailing list