Recently, I got a question about kaazing proxy.The problem is that I use the "proxy" to build a connect between websocket(javascript client) and java(server), the main code in gateway-config.xml is like this:"<accept>ws://${gateway.hostname}:${gateway.extras.port}/mag</accept><connect>tcp://localhost:9999</connect><type>proxy</type>...", and I use "echo message you send" to test it, the javascript main code is like this, "websocket.onopen = function() {log("open");} websocket.onclose = function(e) {log("closed");}" The result runs very well in browser chrome 8-13, it always print "open" at first. I changed nothing and if I use the chrome14,it just print "closed" at begin. Why are about this? Don't kaazing fail to support the crhome14 because of the new draft10? who can help me? I am really concern about this...
Thanks..
Hi,
All you need to do is include the Kaazing client library (called WebSocket.js) in your application. For example:
<script src="WebSocket.js" type="text/javascript" language="javascript"<>/script>
(The path to WebSocket.js may need to adjusted depending on your configuration.)
Best practice is to not rely on native WebSocket. You will have old browsers that don't support it. You will have intermediaries like proxies and firewalls that interrupt the connection. You will have version mismatches as clients and servers deploy their protocols at different rates. There could be buggy implementations that interfere with the handshake or protocol communication. And so on.
One of the value-adds of Kaazing's client library is that it makes your WebSocket application work in all circumstances. If native WebSocket is available and works, then great, it will be used. If not, Kaazing's client library kicks in and ensures the application works. Best of all: it is transparent to the developer, and Kaazing's WebSocket Acceleration™ emulates WebSocket with virtually the same performance characteristics as native WebSocket.
This is easy to test. Open any of the demos on http://demo.kaazing.com, such as http://demo.kaazing.com/portfolio, in any browser, even older browsers that pre-date WebSocket.
Hi, I'am John. follow your advices, I got I want,thanks..It is ok when I add <script src="WebSocket.js" type="text/javascript" language="javascript"></script> in my html.