llOpenRemoteDataChannel

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

llOpenRemoteDataChannel

Americo Damasceno-3
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 );
    }
}

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: llOpenRemoteDataChannel

cliveg
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 <[hidden email]> 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 );
>   }
> }
>
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: llOpenRemoteDataChannel

BlueWall Slade
The xmlrpc works fine. I have seen some issues with some php xmlrpc libraries. I have been using the one from http://pear.php.net/package/XML_RPC2 with good success.


On Sun, Nov 1, 2009 at 1:49 PM, Clive Gould <[hidden email]> wrote:
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 <[hidden email]> 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 );
>   }
> }
>
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users