microsoft/WinDbg-Samples

How to interface JS through TCP

ImanHosseini opened this issue · 2 comments

I want to make a TCP connection between my JS script and another process, is that possible? I know that I can read/write files, but that is not really convenient as a means of talking to another process compared to a TCP connection [over localhost], if no networking is possible, what is the ideal solution for this?

I wasn't able to find a way to do networking tasks directly from the debugger, however I was able to execute shell commands on the host. Using that I was able to run curl and pass it the relevant data I wanted to send to my server and this seems to work quite well. Perhaps not what you're looking for, but it definitely works well enough for interaction with a simple REST interface.

This is not possible directly in JS extensions. You can write native data model extensions that provide this functionality to JS and other data model components.