Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update readme and examples to include meta interface change

  • Loading branch information...
commit 0cd65b0e427bd41f2c840669b3d6539c484005d0 1 parent f49bc52
Tim Oxley authored
8 README.md
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)
}
}
4 examples/simple/client.js
View
@@ -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)
}
}
4 examples/simple/server.js
View
@@ -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)
}
}
2  package.json
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": ""
},
Please sign in to comment.
Something went wrong with that request. Please try again.