Using edge.js is it possible for the .Net C# module to call the node.js part of the process, i.e. do the reverse call?

StackOverflow https://stackoverflow.com/questions/18861687

문제

You can see the interop model for going from Node.js -> C#, here.

What I want to know is, can the C# code then make a call to a method in the Node.js part of the process from the C#, before returning?

Imagine if you had a call, like

var webApi = edge.func('/MyDotNetApi.csx');
webApi(function (error, result) { log.('api started'); });

where the MyDotNetApi.csx returns, but leaves a socket listener thread running to handle HTTP requests. Now, if the Node.js part of the process holds (ever changing) information which the .Net code needs to access for inclusion in its HTTP responses, can it somehow ask Node.js for it?

도움이 되었습니까?

해결책

Calling back Node.js from C# with Edge.js is possible and documented.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top