Merge pull request #4461 from samalbert/feature/zmq_callback_buffer

Updated callback to support indefinite number of buffer params
This commit is contained in:
Masahiro Wakame
2015-05-31 09:55:31 -07:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ function test3() {
var sock = zmq.socket('push');
sock.bindSync('tcp://127.0.0.1:3000');
sock.send(['hello', 'world']);
sock.on('message', function (buffer: Buffer) {
sock.on('message', function (buffer1: Buffer, buffer2: Buffer) {
//
});
}
+1 -1
View File
@@ -182,7 +182,7 @@ declare module 'zmq' {
* @param eventName {string}
* @param callback {Function}
*/
on(eventName: string, callback: (buffer: Buffer) => void): void;
on(eventName: string, callback: (...buffer: Buffer[]) => void): void;
// Socket Options
_fd: any;