WIP for automatic network join
This commit is contained in:
parent
ef3c8e2865
commit
d62dbeffca
12 changed files with 73 additions and 76 deletions
27
test/mocks/FakeNetwork.js
Normal file
27
test/mocks/FakeNetwork.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
var imports = require('soop').imports();
|
||||
var EventEmitter= imports.EventEmitter || require('events').EventEmitter;
|
||||
|
||||
function Network(opts) {
|
||||
}
|
||||
|
||||
Network.parent=EventEmitter;
|
||||
|
||||
Network.prototype.start = function(openCallback, opts) {
|
||||
// start! :D
|
||||
};
|
||||
|
||||
Network.prototype.send = function(peerIds, data, cb) {
|
||||
// send! c:
|
||||
};
|
||||
|
||||
Network.prototype.connectTo = function(peerId) {
|
||||
// connect C:
|
||||
};
|
||||
|
||||
|
||||
Network.prototype.disconnect = function(cb) {
|
||||
// disconect :c
|
||||
};
|
||||
|
||||
module.exports = require('soop')(Network);
|
||||
Loading…
Add table
Add a link
Reference in a new issue