6.3.6 • Published 9 years ago
iku-hub v6.3.6
iku hub
Sample usage
Server
var Server = require('iku-hub/server'),
WsPm = require('i-pm/ws'),
Room = Server.Room,
server = require('http').createServer().listen(8080),
hub = new Server(WsPm(server,'.hub')),
room = new Room();
hub.walk(function*(){
var client;
while(true){
client = yield this.until('client');
room.add(client);
}
});
Client
var Client = require('iku-hub/client'),
WsP = require('i-peer/ws'),
hub = new Client(WsP('ws://localhost:8080/.hub/'));
hub.walk(function*(){
var room = yield this.until('room');
room.walk(function* cb(){
var peer = yield this.until('peer');
this.walk(cb);
peer.send('hi');
peer.walk(function* cb(){
var msg = yield this.until('msg');
this.walk(cb);
console.log(msg); // hi
});
});
});
6.3.6
9 years ago
6.3.5
10 years ago
6.3.4
10 years ago
6.3.3
10 years ago
6.3.2
10 years ago
6.3.1
10 years ago
6.3.0
10 years ago
6.2.0
10 years ago
6.1.1
10 years ago
6.1.0
10 years ago
6.0.1
10 years ago
6.0.0
10 years ago
5.10.0
10 years ago
5.9.0
10 years ago
5.8.0
10 years ago
5.7.0
10 years ago
5.6.0
10 years ago
5.5.1
10 years ago
5.5.0
10 years ago
5.4.0
10 years ago
5.3.0
10 years ago
5.2.0
10 years ago
5.1.2
10 years ago
5.1.1
10 years ago
5.1.0
10 years ago
5.0.0
10 years ago
4.0.2
10 years ago
4.0.1
10 years ago
4.0.0
10 years ago
3.0.1
10 years ago
3.0.0
10 years ago
2.1.2
10 years ago
2.1.1
10 years ago
2.1.0
10 years ago
2.0.0
10 years ago
1.5.0
10 years ago
1.4.0
10 years ago
1.3.2
10 years ago
1.3.1
10 years ago
1.3.0
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.0
10 years ago
0.0.0
10 years ago