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.102 app/drivers/chrome/src/sockio.js
flok-0.0.101 app/drivers/chrome/src/sockio.js
flok-0.0.100 app/drivers/chrome/src/sockio.js
flok-0.0.99 app/drivers/chrome/src/sockio.js
flok-0.0.98 app/drivers/chrome/src/sockio.js
flok-0.0.97 app/drivers/chrome/src/sockio.js
flok-0.0.96 app/drivers/chrome/src/sockio.js
flok-0.0.95 app/drivers/chrome/src/sockio.js
flok-0.0.94 app/drivers/chrome/src/sockio.js
flok-0.0.93 app/drivers/chrome/src/sockio.js
flok-0.0.92 app/drivers/chrome/src/sockio.js
flok-0.0.91 app/drivers/chrome/src/sockio.js
flok-0.0.90 app/drivers/chrome/src/sockio.js
flok-0.0.89 app/drivers/chrome/src/sockio.js
flok-0.0.88 app/drivers/chrome/src/sockio.js
flok-0.0.87 app/drivers/chrome/src/sockio.js
flok-0.0.86 app/drivers/chrome/src/sockio.js
flok-0.0.85 app/drivers/chrome/src/sockio.js
flok-0.0.84 app/drivers/chrome/src/sockio.js
flok-0.0.83 app/drivers/chrome/src/sockio.js