Communicating with a child process
-
My program needs to create a child process to execute some task in. What should I use for the communication between the parent and child process? Using .NET Remoting with TcpServerChannel displays a Windows Firewall warning. It is an requirement that no such warning is displayed. I get no warning if I use a TcpListener with LocalAddress=IPAddress.Loopback, but how can I use that TcpLiostener with remoting? Optimal would be if I could use .NET remoting around a stream I create myself. I don't want the discovery / re-build lost connection / etc. features.
-
My program needs to create a child process to execute some task in. What should I use for the communication between the parent and child process? Using .NET Remoting with TcpServerChannel displays a Windows Firewall warning. It is an requirement that no such warning is displayed. I get no warning if I use a TcpListener with LocalAddress=IPAddress.Loopback, but how can I use that TcpLiostener with remoting? Optimal would be if I could use .NET remoting around a stream I create myself. I don't want the discovery / re-build lost connection / etc. features.
-
Hi Daniel, Have you looked into named pipes? There is a codeproject article[^] (multiple parts) on it.
Take care, Tom ----------------------------------------------- Check out my blog at http://tjoe.wordpress.com
Named pipes just give me a stream like I get with TcpClient, but how can I use .NET Remoting on a stream?
-
Named pipes just give me a stream like I get with TcpClient, but how can I use .NET Remoting on a stream?
There is an article on doing that here[^]. If you are not tied to .Net Remoting, you could also simply serialize the object you wish to send to an array of bytes, send the bytes over to the child process, and then deserialize the object. This would require that both the parent and child process have visibility (e.g. reference) to the object type. Where as with remoting a proxy object (that doesn't actually have any implementation) could be used by the child. Let me know if this helps or not.
Take care, Tom ----------------------------------------------- Check out my blog at http://tjoe.wordpress.com