Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Flotype/now
Browse files Browse the repository at this point in the history
  • Loading branch information
ericz committed Jul 22, 2011
2 parents e731d4f + 267cf0a commit 714e818
Show file tree
Hide file tree
Showing 17 changed files with 1,091 additions and 618 deletions.
5 changes: 3 additions & 2 deletions changelog.md
Expand Up @@ -3,14 +3,15 @@ NowJS Version 0.7.0 - 7/16/2011
Changes since 0.6.1:

* Socket.IO dependency updated to >= 0.7.
* `group.exclude()` implemented.
* `group.exclude()` implemented. [Usage](http://nowjs.com/jsdoc/symbols/Group.html#exclude)
* `group.hasClient()`, `group.count` modified to be asynchronous
functions.
functions. [Usage](http://nowjs.com/jsdoc/symbols/Group.html#count)
* Exposed more client-side events.
* `everyone.on('join', cb)` and `everyone.on('leave', cb)` have
replaced of `nowjs.on('connect', cb)` and `nowjs.on('disconnect', cb)`
(and their aliases, `nowjs.connected(cb)` and `nowjs.disconnected(cb)`).
* Even more performance increases.
* [Added JSDoc documentation](http://nowjs.com/jsdoc/index.html)

NowJS Version 0.6.1 - 6/10/2011
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/jsdoc/files.html
Expand Up @@ -57,7 +57,7 @@ <h2 class="heading1">Classes</h2>

Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
Generated on: 2011-6-21 15:12
Generated on: 2011-6-22 12:26
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion doc/jsdoc/index.html
Expand Up @@ -57,7 +57,7 @@ <h2 class="heading1">Classes</h2>

Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
Generated on: 2011-6-21 15:12
Generated on: 2011-6-22 12:26
</div>
</div>

Expand Down
10 changes: 9 additions & 1 deletion doc/jsdoc/symbols/Group#now.html
Expand Up @@ -57,7 +57,7 @@ <h2 class="heading1">Classes</h2>

Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
Generated on: 2011-6-21 15:12
Generated on: 2011-6-22 12:26
</div>
</div>

Expand Down Expand Up @@ -145,6 +145,14 @@ <h2 class="sectionTitle" id="constructor">
</div>



<pre class="code">everyone.now.prop = 42;</pre>

<pre class="code">everyone.now.func = function () {
console.log('hello!');
};</pre>





Expand Down
104 changes: 103 additions & 1 deletion doc/jsdoc/symbols/Group.html
Expand Up @@ -57,7 +57,7 @@ <h2 class="heading1">Classes</h2>

Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
Generated on: 2011-6-21 15:12
Generated on: 2011-6-22 12:26
</div>
</div>

Expand Down Expand Up @@ -357,6 +357,27 @@ <h2 class="sectionTitle" id="constructor">



<dl class="detailList nomargin">











<dt class="heading">See:</dt>

<dd><a href="../symbols/Now.html#getGroup">Now#getGroup</a></dd>

<dd><a href="../symbols/Group%23now.html">Group#now</a></dd>


</dl>

</div>
</div>

Expand Down Expand Up @@ -431,6 +452,10 @@ <h2 class="sectionTitle">
</div>



<pre class="code">everyone.addUser('1234567890');</pre>




<dl class="detailList params">
Expand Down Expand Up @@ -523,6 +548,12 @@ <h2 class="sectionTitle">
</div>



<pre class="code">everyone.count(function (ct) {
console.log(ct);
});</pre>




<dl class="detailList params">
Expand Down Expand Up @@ -617,6 +648,18 @@ <h2 class="sectionTitle">
</div>



<pre class="code">everyone.now.distribute = function (msg) {
everyone.exclude([this.user.clientId]).now.receive(this.now.name, msg);
};</pre>

<pre class="code">factionOne.now.distribute = function (msg) {
factionTwo.getUsers(function (users) {
factionOne.exclude(users).now.receive(this.user.clientId, msg);
});
};</pre>




<dl class="detailList params">
Expand Down Expand Up @@ -659,6 +702,12 @@ <h2 class="sectionTitle">
</div>



<pre class="code">everyone.getUsers(function (users) {
for (var i in users) console.log(i);
});</pre>




<dl class="detailList params">
Expand All @@ -675,6 +724,27 @@ <h2 class="sectionTitle">



<dl class="detailList nomargin">












<dt class="heading">See:</dt>

<dd><a href="../symbols/Now.html#getClient">Now#getClient</a></dd>



</dl>

<div class="hr"></div>
</li>

Expand All @@ -701,6 +771,14 @@ <h2 class="sectionTitle">
</div>



<pre class="code">group.hasClient('1234567890', function (bool) {
if (bool) {
console.log('User is a member of `group`.');
}
});</pre>




<dl class="detailList params">
Expand Down Expand Up @@ -749,6 +827,10 @@ <h2 class="sectionTitle">
</div>



<pre class="code">otherGroup.removeUser('1234567890');</pre>




<dl class="detailList params">
Expand Down Expand Up @@ -892,6 +974,12 @@ <h2 class="sectionTitle">
</div>



<pre class="code">everyone.on('join', function () {
otherGroup.addUser(this.user.clientId);
});</pre>





Expand Down Expand Up @@ -919,6 +1007,20 @@ <h2 class="sectionTitle">
</div>



<pre class="code">otherGroup.on('leave', function () {
// Store the context, i.e. the user who has just left.
var self = this;
// Check that the user is still connected to the server.
everyone.hasClient(this.user.clientId, function (bool) {
if (bool) {
// Send parting words to the client.
this.now.receive('SERVER', 'Goodbye. I'll miss you dearly.');
}
});
});</pre>





Expand Down

0 comments on commit 714e818

Please sign in to comment.