Fixes event type when emitting binary_ack
When submitting binary data in an Ack to the server the packet's type was not the expected (should be 6 - binary_ack - and not 3 - ack). This commit introduces tests as well a fix for the given problem.
This commit is contained in:
@@ -57,6 +57,17 @@ io.of(nsp).on('connection', function(socket) {
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('callAckBinary', function() {
|
||||
socket.emit('ack', function(buf) {
|
||||
socket.emit('ackBack', buf);
|
||||
});
|
||||
});
|
||||
|
||||
socket.on('getAckBinary', function(data, callback) {
|
||||
var buf = new Buffer('huehue', 'utf8');
|
||||
callback(buf);
|
||||
});
|
||||
|
||||
socket.on('getAckDate', function(data, callback) {
|
||||
callback(new Date());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user