I am looking to write a couple of tcp servers/clients in node. I'm trying to figure out what node.js ecosystem provides for making such development easier. I'm thinking of something similar to parts of (java's) netty. That project provides a way to implement the protocol in a way that it can be plugged into the network code pipeline or taken out of actual tcp connection code to be tested independently.
Node's http frameworks often provide a middle-ware layer. Users can write code which intercepts requests or responses to isolate bits of functionality so the actual request/response interface doesn't change much. This results in 3rd party providers of such code which does logging, authentication, etc.
Does something like this exist for lower level networking code? (since my testing out some ideas, if someone knows of other non-java/c++/c# languages which DO provide such features/libraries, I'd like to read about them as well)