Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Communicating with a child process

Communicating with a child process

Scheduled Pinned Locked Moved C#
questioncsharp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel Grunwald
    wrote on last edited by
    #1

    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.

    T 1 Reply Last reply
    0
    • D Daniel Grunwald

      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.

      T Offline
      T Offline
      TJoe
      wrote on last edited by
      #2

      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

      D 1 Reply Last reply
      0
      • T TJoe

        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

        D Offline
        D Offline
        Daniel Grunwald
        wrote on last edited by
        #3

        Named pipes just give me a stream like I get with TcpClient, but how can I use .NET Remoting on a stream?

        T 1 Reply Last reply
        0
        • D Daniel Grunwald

          Named pipes just give me a stream like I get with TcpClient, but how can I use .NET Remoting on a stream?

          T Offline
          T Offline
          TJoe
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups