Add .on() function to zeromq and a test for it.

This commit is contained in:
Panu Horsmalahti
2014-12-08 12:02:25 +02:00
parent 72f8dbc007
commit b353038db3
2 changed files with 13 additions and 0 deletions
+9
View File
@@ -3,6 +3,8 @@
// Definitions by: Dave McKeown <http://github.com/davemckeown>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path='../node/node-0.11.d.ts' />
interface EventEmitter {}
declare module 'zmq' {
@@ -150,6 +152,13 @@ declare module 'zmq' {
*/
close(): Socket;
/**
* Socket event
* @param eventName {string}
* @param callback {Function}
*/
on(eventName: string, callback: (buffer: Buffer) => void): void;
// Socket Options
_fd: any;
_ioevents: any;