Sha256: 40f542ff0a63d175aaae0022f2325e02bcb1664e9cdd86b7b6fe86f5ec90c8d7
Contents?: true
Size: 776 Bytes
Versions: 2
Compression:
Stored size: 776 Bytes
Contents
sp_to_sockio = {} function if_sockio_init(url, sp) { sp_to_sockio[sp] = io(url, { "forceNew": true }); } function if_sockio_fwd(sp, event_name, bp) { //Grab socket var socket = sp_to_sockio[sp]; if (socket) { //Forward events socket.on(event_name, function(info) { int_dispatch([3, "int_event", bp, event_name, info]); }); } else { <% if @debug %> console.error("Couldnt fwd sockio with sp: " + sp + " (It does not exist)"); <% end %> } } function if_sockio_send(sp, event_name, info) { //Grab socket var socket = sp_to_sockio[sp]; if (socket) { socket.emit(event_name, info); } else { <% if @debug %> console.error("Couldnt fwd sockio with sp: " + sp + " (It does not exist)"); <% end %> } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flok-0.0.105 | app/drivers/chrome/src/sockio.js |
flok-0.0.103 | app/drivers/chrome/src/sockio.js |