Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Correct" way to communicate with a local Windows Service

What's the 'correct', or at least 'typical' way to communicate with a Windows service running locally?

I can see that it's pretty trivial to use WCF to open a HTTP or TCP endpoint, but both these are really network protocols.

What protocol should I choose to invoke methods and receive responses from a local windows service?

like image 263
BanksySan Avatar asked Aug 09 '15 23:08

BanksySan


1 Answers

You can use:

  • Socket communications (TCP, HTTP, or other): even though you say they are network protocols the advantage is that you might already know them
  • Named pipes: this is a good option for communication between processes running in the same node: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365590(v=vs.85).aspx
  • shared memory: this is the fastest
  • Other third party, higher level, library like Thrift which uses sockets
like image 191
rodolk Avatar answered Sep 26 '22 14:09

rodolk