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 9307249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:21:12+00:00 2026-06-19T00:21:12+00:00

I have a main PC that will receive information from many others PCs. The

  • 0

I have a main PC that will receive information from many others PCs. The main PC will also send commands to the other PCs.

The PCs will have to read what they have received and do something and call some functions. Now my problem is how can I implement this. I saw WCF, but I think it won’t work in my conditions. So i guess Sockets will work fine but here’s what I want.

Let the clients keep reading the data they are receiving on a specific port and also send the data to the main PC, each client on different port or on the same port where the ID of each PC will be added to the string I’m sending.

For example:

a or b or ab

If I read a or b on the client I should call a specific function. I need something similar to while reading a SERIAL PORT.

Any ideas or examples will be really helpful! I’m a bit confused.

  • 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-06-19T00:21:13+00:00Added an answer on June 19, 2026 at 12:21 am

    You need to open a socket, and then read continuously a byte at a time. Check if the byte is equal to the byte you’re looking for, and call appropriate methods.

    var tcpClient = new TcpClient();
    tcpClient.Connect("server host", server_port);
    var streamReader = new StreamReader(tcpClient.GetStream());
    while (true)
    {
        var letter = (char)streamReader.Read();
        if (letter == 'a')
        {
            // ...
        }
        else if (letter == 'b')
        {
            // ...
        }
    }
    

    The above code sample should get you started.

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

Sidebar

Related Questions

I have a main app that will have many plugins. Here is the PluginReader
I have a main NSMutableDictionary that contains a collection of others NSMutableDictionary. The thing
I have a main loop that I replace with other loops when certain icons
Our scenario: We have a main database that stores company-wide information. We have several
I have a PHP Script that received information from a piped email forwarder. Currently
We are building an application that will have clients installed in many sites. Each
I am trying to write a program that will receive an input from a
I have a multi-threaded Java application that will output information about a message it
I have a main report that prompts the user to enter two parameters (@ORI
I have a main uinavigationcontroller that loads a uitableview as a subview as my

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.