Le Wednesday 18 February 2015, Frédéric a écrit :

> > if you have the choice I'd combine
> > NodeJS +
> > SocketIO ( http://davidwalsh.name/websocket )+
> > ZeroMQ ( this is if you need to communicate on the server side to /
> > with other scripts, like Perl, Python etc ) +
> > time and fun.  
> 
> Thanks for the tips; I'll dig that way (entire new to me).

But before I switch to this solution, I would like to use the same
technic used by knxweb2: calling a php script (using JQuery) which in
turn opens the Tcp socket to communicate with the server (linknx).

The question is: where should I put this php script (linknx.php), in
order to use it with this code:

qx.Class.define("pknyxui.model.LinknxService",
{
    type: "singleton",

    extend: qx.core.Object,

    members:
    {
        query: function(message) {
            var t = new Date().getTime();
            var data = null;
            var req = jQuery.ajax({
                type: "post",
                url: "linknx.php?action=cmd&nocache=" + t,
                data: message,
                processData: false,
                dataType: 'xml',
                async: false,
                success: function(responseXML, status) {
                    var xmlResponse = responseXML.documentElement;
                    // [snip]
                }
            });
            return data;
        }
    }
});

Thanks,

-- 
    Frédéric

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to