Live texturing

This commit is contained in:
maqu14
2016-03-18 10:14:02 +01:00
parent 65e5729118
commit 7fc83d1471
155 changed files with 18378 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
var zmq = require('..')
, should = require('should')
, semver = require('semver');
describe('socket.events', function(){
it('should support events', function(done){
var rep = zmq.socket('rep')
, req = zmq.socket('req');
rep.on('message', function(msg){
msg.should.be.an.instanceof(Buffer);
msg.toString().should.equal('hello');
rep.send('world');
});
rep.bind('inproc://stuff');
rep.on('bind', function(){
req.connect('inproc://stuff');
req.send('hello');
req.on('message', function(msg){
msg.should.be.an.instanceof(Buffer);
msg.toString().should.equal('world');
req.close();
rep.close();
done();
});
});
});
});