From b1f7e65f18f674e05eae71f3d04815a30eb0a82e Mon Sep 17 00:00:00 2001 From: David Dias Date: Wed, 8 Jul 2015 16:23:03 -0700 Subject: [PATCH] Initial Commit --- src/identify.js | 12 +++++------- src/index.js | 3 --- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/identify.js b/src/identify.js index 34f9792f..c185ea5e 100644 --- a/src/identify.js +++ b/src/identify.js @@ -25,16 +25,14 @@ exports.inquiry = function (spdyConnection, cb) { }) }) }) - // 0. open a stream - // 1. negotiate /ipfs/identify/1.0.0 - // 2. check other peerId - // 3. reply back with cb(null, connection, peerId) +// 0. open a stream +// 1. negotiate /ipfs/identify/1.0.0 +// 2. check other peerId +// 3. reply back with cb(null, connection, peerId) } // peer asking which pairs ip:port does the other peer see -exports.whoAmI = function () { - -} +exports.whoAmI = function () {} exports.start = function (peerSelf) { swarm.registerHandle('/ipfs/identify/1.0.0', function (ds) { diff --git a/src/index.js b/src/index.js index 7524cd87..c12267f2 100644 --- a/src/index.js +++ b/src/index.js @@ -14,7 +14,6 @@ var handles = [] // set the listener exports.listen = function () { - tcp.createServer(function (socket) { var ms = new Select() ms.handle(socket) @@ -63,7 +62,6 @@ exports.openStream = function (peer, protocol, cb) { // If no connection open yet, open it if (!connections[peer.id.toB58String()]) { - // Establish a socket with one of the addresses var gotOne = false async.eachSeries(peer.multiaddrs, function (multiaddr, callback) { @@ -158,4 +156,3 @@ function registerHandles (spdyStream) { msH.addHandler(handle.protocol, handle.func) }) } -