text: spyre.factory('WSConnect', function() {
      var WSConnect = {};
  
      WSConnect.connect = function(ws_url) {
          WSConnect.ws = new FancyWebSocket(ws_url);
          if(ws_url === undefined) {
              WSConnect.ws.send = {};
              WSConnect.ws.bind = {};
          }
      };
  
      return WSConnect;
      
  });
  
  spyre.factory('WSService', function(WSConnect) {
      return {
          r: function(rcall) {
  	    return WSConnect.ws.send(rcall);
          },
          register_ws_callback: function(event, callback) {
              return WSConnect.ws.bind(event, callback);
          }
      };
  });
  