async-listener icon indicating copy to clipboard operation
async-listener copied to clipboard

net.Socket 'connect' event is not wrapped

Open rf opened this issue 10 years ago • 1 comments

Here's a failing test on my fork. I'm not sure this is something that can be wrapped without potentially wrapping the whole (Socket) emitter with something like events-intercept.

Tested fails on node v0.10.26 & v0.8.8

cc @sh1mmer @Raynos

rf avatar Jan 15 '15 23:01 rf

This is probably a job for emitter-listener (or it could be events-intercept, if that's significantly simpler). The tricky part is that the performance hit if you wrap every socket would be pretty severe. I'll need to come up with a way to do this in a much more lightweight way.

Thanks for the report! If you get inspired to try to hack around this, let me know, even if the code is incomplete or gross.

othiym23 avatar Jan 17 '15 09:01 othiym23