Sha256: 78f89dbafebbe674e7c64d11bad5d1fe263458956161e87c1dc87094617a5004
Contents?: true
Size: 744 Bytes
Versions: 21
Compression:
Stored size: 744 Bytes
Contents
sp_to_sockio = {} function if_sockio_init(url, sp) { sp_to_sockio[sp] = io(url); } 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 dspn't 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 dspn't exist)"); <% end %> } }
Version data entries
21 entries across 21 versions & 1 rubygems