Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7607049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:33:49+00:00 2026-05-31T00:33:49+00:00

Possible Duplicate: Can C# be piped? Is there a way to connect two programs

  • 0

Possible Duplicate:
Can C# be piped?

Is there a way to connect two programs across a network in such a way that all calls coming from the one program can be piped across to another computer and then given to the receiving program. I’ve included one way that I could do this below, but there should be a better way, since this is would be a ponderous (and seemingly pointless) amount of code to keep up-to-date. The program I am working with is Ascom, which uses a lot of inter-process communication with COM. This is just an example, there are many interfaces that would need to be kept updated.

class SwitchConverter : ASCOM.Interface.ISwitch
{
    private Client client = new Client();
    private string query(string query){ return client.query(query); }
    private void send(string command) { client.send(command); }
    public bool Connected { get { return bool.Parse(query("SWITCHGETCONN")); } set { send("SWITCHSETCONN:" + value); } }
    public string Description { get { return query("SWITCHGETDESC"); } }
    public string DriverInfo { get { return query("SWITCHGETDRVI"); } }
    public string DriverVersion { get { return query("SWITCHGETDRVV"); } }
    public bool GetSwitch(short ID) { return bool.Parse(query("SWITCHGETSTAT:" + ID)); }
    public string GetSwitchName(short ID) { return query("SWITCHGETNAME:" + ID); }
    public short InterfaceVersion { get { return short.Parse(query("SWITCHGETINTV")); } }
    public short MaxSwitch { get { return short.Parse(query("SWITCHGETMAXS")); } }
    public string Name { get { return query("SWITCHGETNAME"); } }
    public void SetSwitch(short ID, bool State) { send("SWITCHSETSTAT:" + ID + "-" + State); }
    public void SetSwitchName(short ID, string Name) { send("SWITCHSETNAME:" + ID + "-" + Name); }
    public void SetupDialog() { throw new NotImplementedException(); }
}

So as you can see that would look like this:

            /== Encoder ==\                /== Decoder ==\
           /=== Encoder ===\              /=== Decoder ===\
          /==== Encoder ====\            /==== Decoder ====\
Client ==<===== Encoder =====>== Pipe ==<===== Decoder =====>== Server
          \==== Encoder ====/            \==== Decoder ====/
           \=== Encoder ===/              \=== Decoder ===/
            \== Encoder ==/                \== Decoder ==/

Now, is there a way to just simply take the server interface, and pipe it across to the client, and take the client interface and pipe it across to the server, as illustrated below? That way the server would call the pipe and the pipe would forward it to the client. If the client would call the server, it would simply forward it to the server. Since we are dealing with separate programs, that should be very simple I would think. I was reading about .NET Remoting, but that is apparently deprecated. I asked this question before, but no one answered so I thought I would spell out //exactly// what I am triying to do.

Client ====(<Server) Pipe (Client>)==== Server

When I say pipe, I just mean a connection that sends data from one program to another across the network. Also, I am looking for either an example implementation, or a link to an example implementation. Not just “try x or y”. This has to be possible!

In short what I am trying to do is make so that the client and the server can communicate as if they are on the same computer, where they are using COM, without having the “man in the middle” translate anything, just connect them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:33:50+00:00Added an answer on May 31, 2026 at 12:33 am

    The objectives your question sets out are a little hard to disseminate, but as I understand it, you’re looking for a mechanism for communicating between clients and servers over a network.

    If this is the case, the Windows Communication Foundation (WCF) should be your tool.

    It works on the basis of creating a contract between server and client, defined as a .NET interface (with some caveats), which can then be exposed via a server (using a range of protocols) and consumed by a client application.

    You can follow this article to get a quick start into the technology; it should give you enough information to create a prototype to see if it meets your needs.

    The subject of WCF is quite massive though, so you’ll need to spend time with it to get it working exactly as you’d like.


    If your processes are running on the same box, you can used Named Pipes to perform cross-process communication (<netNamedPipeBinding>), as a replacement for COM. Named Pipes are designed specifically for cross-process communication and very efficient at this task.

    If your processes are running on different boxes, you can use TCP to perform the same communications over a network (<netTcpBinding>). TCP will communicate in binary messages, so is still very effective for communicating between your two processes.

    As far as WCF is concerned, these are just configuration settings. Once you have set up your server and client, you can communicate over the network as easily as if the two applications were on the same box.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Can I change all my links to just //? I came across
Possible Duplicate: Can I change all my links to just //? I've learnt that
Possible Duplicate: How can I find the method that called the current method? I
Possible Duplicate: How can I access local scope dynamically in javascript? Hi all. We
Possible Duplicate: Can a recursive function be inline? I think that recursive function defined
Possible Duplicate: Can a Bash script tell what directory it's stored in? Is there
Possible Duplicate: Can Google Maps/Places 'autocomplete' API be used via AJAX? There seems to
Possible Duplicate: Can’t operator == be applied to generic types in C#? I've got
Possible Duplicate: Can’t operator == be applied to generic types in C#? I've coded
Possible Duplicate: Can you animate a height change on a UITableViewCell when selected? This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.