compatibility - Ratchet PHP zeromq fallback to older browsers -


following instruction http://socketo.me/docs/push had working.

however, i'd service compatible older browsers (ie 8 etc), need use flash fallback (like web_socket.js or similar) this:

function initpull() {     var conn = new ab.session(          // host (our ratchet websocket server)         'ws://'+push_socket_server+':'+push_socket_port+'/',          // once connection has been established         function() {                         conn.subscribe(topic_prefix+rid, function(topic, data) {                  //trigger action                 atrigger(data);             });         },          // when connection closed         function() {                         console.warn('websocket connection closed');         },          // additional parameters, we're ignoring wamp sub-protocol older browsers         {             'skipsubprotocolcheck': true         }     ); } 

ratchet supports web-socket-js, natural polyfill. zmq code on server side , still executed if client using native websockets or flash polyfill.

keep code push tutorial is, add web-socket-js code client , see code flashpolicy component.

for bit more involved example, see this example on how server flash policy files without having run 2 separate processes.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -