Permalink
Browse files

Update readme and examples to include meta interface change

  • Loading branch information...
1 parent f49bc52 commit 0cd65b0e427bd41f2c840669b3d6539c484005d0 @timoxley committed Jan 27, 2012
Showing with 9 additions and 9 deletions.
  1. +4 −4 README.md
  2. +2 −2 examples/simple/client.js
  3. +2 −2 examples/simple/server.js
  4. +1 −1 package.json
View
@@ -30,8 +30,8 @@ but can also take a callback.
var enode = require('enode')
var api = {
- whoami: function(callback) {
- callback(null, "server")
+ whoami: function(callback, meta) {
+ callback(null, "server " + meta.connection.id))
}
}
@@ -58,8 +58,8 @@ server.on('disconnect', function(connection) {
var enode = require('enode')
var api = {
- whoami: function(callback) {
- callback(null, "client")
+ whoami: function(callback, meta) {
+ callback(null, "client " + meta.connection.id)
}
}
@@ -1,8 +1,8 @@
var enode = require('../../index')
var api = {
- whoami: function(callback, remote, connection) {
- callback(null, "client. connection id: " + connection.id)
+ whoami: function(callback, meta) {
+ callback(null, "client. connection id: " + meta.connection.id)
}
}
@@ -1,8 +1,8 @@
var enode = require('../../index')
var api = {
- whoami: function(callback, remote, connection) {
- callback(null, "server. connection id: " + connection.id)
+ whoami: function(callback, meta) {
+ callback(null, "server. connection id: " + meta.connection.id)
}
}
View
@@ -2,7 +2,7 @@
"author": "Tim Oxley <secoif@gmail.com> (unit.io)",
"name": "enode",
"description": "Easier interface to dnode.",
- "version": "0.0.2",
+ "version": "0.0.3",
"repository": {
"url": ""
},

0 comments on commit 0cd65b0

Please sign in to comment.