App-SocialCalc-Multiplayer

 view release on metacpan or  search on metacpan

socialcalc/formula1.js  view on Meta::CPAN

//
// To add a function, just add it to this object.

   if (!SocialCalc.Formula.FunctionList) { // make sure it is defined (could have been in another module)
      SocialCalc.Formula.FunctionList = {};
      }

   // FunctionClasses[classname] = {name: full-name-string, items: [sorted list of function names]};
   // filled in by SocialCalc.Formula.FillFunctionInfo

   SocialCalc.Formula.FunctionClasses = null; // start null to say needs filling in

   // FunctionArgDef[argname] = explicit-string-for-arg-list;
   // filled in by SocialCalc.Formula.FillFunctionInfo

   SocialCalc.Formula.FunctionArgDefs = {};


/*
#
# errortext = SocialCalc.Formula.CalculateFunction(fname, operand, sheet)

socialcalc/simpleedit15.pl  view on Meta::CPAN

      if (t) {
         scf.PushOperand(operand, funccache[query].substring(0,t), funccache[query].substring(t+1));
         }
      else {
         scf.PushOperand(operand, "t", "Server Error? "+funccache[query]);
         }
      return null;
      }


   scf.RemoteFunctionInfo.waitingForServer = "SOCIALTEXT"; // say what waiting for
   funcquery = query; // remember for setting when get it
   ajaxrequest2("", "&rpc=socialtext&"+query);
   return "Waiting for server"; // return an error for function
   }

// Add to function list
SocialCalc.Formula.FunctionList["SOCIALTEXT"] = [SocialCalc.Formula.SocialtextFunction, -1];


// define functions

socialcalc/socialcalc-3.js  view on Meta::CPAN


   delete sheet.attribs.needsrecalc; // remember recalc done

   scri.sheet = sheet.previousrecalcsheet || null; // chain back if doing recalc of loaded sheets
   if (scri.sheet) {
      scri.currentState = scri.state.calc; // start where we left off
      SocialCalc.RecalcSetTimeout();
      return;
      }

   scf.FreshnessInfo.recalc_completed = true; // say freshness info is complete

   do_statuscallback("calcfinished", (new Date()) - scri.starttime);

   }


//
// circref = SocialCalc.RecalcCheckCell(sheet, coord)
//
// Checks cell to put on calclist, looking at parsed tokens.

socialcalc/third-party/Socket.IO-node/Readme.md  view on Meta::CPAN

  });

  news.on('news', function () {
    news.emit('woot');
  });
</script>
```

### Sending volatile messages.

Sometimes certain messages can be dropped. Let's say you have an app that
shows realtime tweets for the keyword `bieber`. 

If a certain client is not ready to receive messages (because of network slowness
or other issues, or because he's connected through long polling and is in the
middle of a request-response cycle), if he doesn't receive ALL the tweets related
to bieber your application won't suffer.

In that case, you might want to send those messages as volatile messages.

#### Server side



( run in 0.865 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )