Skip to content

Parent <-> child communication design. #1025

Answered by AArnott
slimshader asked this question in Q&A
Discussion options

You must be logged in to vote

Named pipes are bidirectional, so you don't need each process to create both a server and a client pipe. The parent process should create a named pipe and all child processes can connect to it as clients. Now each client has a bidirectional stream with the parent, over which JSON-RPC can be done.
The server would indeed have a loop that would repeatedly listen on the named pipe for incoming connections and as each connection is made, it should connect a JsonRpc object to it using Attach as you've done. But it should not await jsonRpc.Completion or else it'll hang there until the client hangs up before listening for the next incoming connection.

Once the connection is established, you can …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by slimshader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1024 on March 28, 2024 19:49.