Sha256: c07358eee1f4963bd151c09b7c4846721f610971f416a4a70cba8f32858e3e6a

Contents?: true

Size: 772 Bytes

Versions: 62

Compression:

Stored size: 772 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 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

62 entries across 62 versions & 1 rubygems

Version Path
flok-0.0.82 app/drivers/chrome/src/sockio.js
flok-0.0.81 app/drivers/chrome/src/sockio.js
flok-0.0.80 app/drivers/chrome/src/sockio.js
flok-0.0.79 app/drivers/chrome/src/sockio.js
flok-0.0.78 app/drivers/chrome/src/sockio.js
flok-0.0.77 app/drivers/chrome/src/sockio.js
flok-0.0.76 app/drivers/chrome/src/sockio.js
flok-0.0.75 app/drivers/CHROME/src/sockio.js
flok-0.0.74 app/drivers/CHROME/src/sockio.js
flok-0.0.73 app/drivers/CHROME/src/sockio.js
flok-0.0.72 app/drivers/CHROME/src/sockio.js
flok-0.0.71 app/drivers/CHROME/src/sockio.js
flok-0.0.70 app/drivers/CHROME/src/sockio.js
flok-0.0.69 app/drivers/CHROME/src/sockio.js
flok-0.0.68 app/drivers/CHROME/src/sockio.js
flok-0.0.67 app/drivers/CHROME/src/sockio.js
flok-0.0.66 app/drivers/CHROME/src/sockio.js
flok-0.0.65 app/drivers/CHROME/src/sockio.js
flok-0.0.64 app/drivers/CHROME/src/sockio.js
flok-0.0.63 app/drivers/CHROME/src/sockio.js