1. 6
  1.  

  2. 1

    one could also create a socket connection between nodejs and .net and do the same communication over it.

    1. 1

      Using TCP has some downsides cuz other processes in the same machine could maliciously or accidentally connect to it. Especially if it talks http, miscreants might be able to get a browser to send requests to it with CSRF attacks. Various commercial products have shipped RCEs doing this, so you at least need authentication in the protocol to not introduce vulns.

      Using a pair of anonymous pipes as stdin & stdout works fine.

      On cursory reading it sounds like Windows might not yet have socketpair even though some support for AF_UNIX sockets has existed for a while now.

      1. 1

        That’s true, and since they are consumed as stream all would work with no changes. Using sockets has the added complexity of having to choose a port. stdin and stdout are already there and ready to use.