Closed lfk closed 9 years ago
@lfk just address the one minor comment and this LGTM. A test would also be appreciated :)
@jcrugzz Removed the unused arg and added two tests (for pub/sub and emitter) that basically just check that this
within the listeners is an instance of the corresponding socket type. Good to go? :)
LGTM thanks @lfk
Thank you @jcrugzz! Just out of curiosity, when could we expect to see this available via npm?
@lfk right now. 2.0.2
@jcrugzz Excellent! Thank you yet again. :)
Receiving a message via a
SubSocket
allows the user to access the underlying socket, whereas inSubEmitterSocket
only the message buffer is exposed. I came across this inconsistency when I needed to access a publishing socket's identity from within a listener.Please compare the suggested solution with the current implementation of
SubSocket.prototype.onmessage
.