mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-02 20:21:20 +00:00
identify + test refactor and reorg
This commit is contained in:
parent
572c7e4cfa
commit
6c82973315
@ -36,8 +36,8 @@ function Identify (swarm, peerSelf) {
|
|||||||
|
|
||||||
stream.end()
|
stream.end()
|
||||||
|
|
||||||
// receive their info and how they see us
|
// receive their info and how they see us
|
||||||
// send back our stuff
|
// send back our stuff
|
||||||
})
|
})
|
||||||
|
|
||||||
swarm.on('connection', function (spdyConnection) {
|
swarm.on('connection', function (spdyConnection) {
|
||||||
@ -79,9 +79,9 @@ function Identify (swarm, peerSelf) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// open a spdy stream
|
// open a spdy stream
|
||||||
// do the multistream handshake
|
// do the multistream handshake
|
||||||
// send them our data
|
// send them our data
|
||||||
})
|
})
|
||||||
|
|
||||||
function exportPeer (peer) {
|
function exportPeer (peer) {
|
||||||
|
@ -45,7 +45,6 @@ afterEach(function (done) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
experiment('BASE', function () {
|
experiment('BASE', function () {
|
||||||
|
|
||||||
test('Open a stream', {timeout: false}, function (done) {
|
test('Open a stream', {timeout: false}, function (done) {
|
||||||
var protocol = '/sparkles/3.3.3'
|
var protocol = '/sparkles/3.3.3'
|
||||||
var c = new Counter(2, done)
|
var c = new Counter(2, done)
|
||||||
@ -61,13 +60,9 @@ experiment('BASE', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
experiment('IDENTIFY', function () {
|
experiment('IDENTIFY', function () {})
|
||||||
|
|
||||||
})
|
experiment('HARDNESS', function () {})
|
||||||
|
|
||||||
experiment('HARDNESS', function () {
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
function Counter (target, callback) {
|
function Counter (target, callback) {
|
||||||
var c = 0
|
var c = 0
|
||||||
@ -80,5 +75,3 @@ function Counter (target, callback) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user