Async two-way communication with Windows Named Pipes (.Net)

后端 未结 3 1218
时光说笑
时光说笑 2020-12-07 22:06

I have a windows service and a GUI that need to communicate with each other. Either can send messages at any time.

I\'m looking at using NamedPipes, but it seems tha

3条回答
  •  心在旅途
    2020-12-07 22:34

    Using a single point to accumulate messages (a single pipe in this case) forces you to handle direction of the message yourself too (in addition to that you have to use a system-wide lock for the pipe).

    So use 2 pipes with opposite directions.

    (Another option would be using 2 MSMQ queues).

提交回复
热议问题