1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexira [117]
3 years ago
11

Design a program using ordinary pipes in which one process sends a string message to a second process, and the second process re

verses the case of each character in the message and sends it back to the first process. for example, if the first process sends the message hi there, the second process will return hi there. this will require using two pipes, one for sending the original message from the first to the second process and the other for sending the modified message from the second to the first process. you can write this program using either unix or windows pipes.
Computers and Technology
1 answer:
Dmitry [639]3 years ago
5 0

Here's a solution in C#. Create two console applications, one for the client and one for the server. In the server, put this:

           Console.WriteLine("Listening to pipe...");

           var server = new NamedPipeServerStream("BrainlyPipe");

           server.WaitForConnection();

           var reader = new StreamReader(server);

           var writer = new StreamWriter(server);

           while (true)

           {

               var line = reader.ReadLine();

               if (!server.IsConnected) break;

               Console.WriteLine("Received: " + line);

               writer.WriteLine(ChangeCase(line));

               writer.Flush();

           }

To change case, add this function:

       public static string ChangeCase( string s)

       {

           var sb = new StringBuilder();

           foreach(char c in s)

               sb.Append(char.IsUpper(c) ? char.ToLower(c) : char.ToUpper(c));

           return sb.ToString();

       }

In the client, put this:

           var client = new NamedPipeClientStream("BrainlyPipe");

           client.Connect();

           var reader = new StreamReader(client);

           var writer = new StreamWriter(client);

           writer.WriteLine("Brainly question 13806153 demo");

           writer.Flush();

           Console.WriteLine(reader.ReadLine());

           Console.ReadLine();


You might be interested in
Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that a
solong [7]

Answer:

Windows Server operating systems are a popular choice for a network because they use wizards and setup devices as the user operating system, making it easier to set up network features work on networks that include using Windows operating systems as well as Mac OS, NetWare, or UNIX

Explanation:

Windows operating system is popular than any other operating system for certain reasons:

1. It provides GUI feature which any layman can access and learn easily

2. The compatibility that it provides makes it more popular

3. It supports most of the software program available in the market

4. The design of Windows is more comfortable when compared to other open source operating system.

Only thing is that it is not a free-ware. Licence needs to be purchased to use it.

6 0
3 years ago
I'm making a game. I'm trying to make it so that instead of how I currently have it, starting whenever I click the screen, it st
Lera25 [3.4K]
That’s cool I’ll play the game tonight if I can
6 0
2 years ago
How many panes can Pablo view in a spreadsheet if he chooses the split worksheet option?
ddd [48]
Pablo can be a minimum of two pains and a maximum of four panes in a split screen worksheet.
6 0
3 years ago
Read 2 more answers
What is land? Explain its features​
egoroff_w [7]

Answer:

Odd question but okay....

Explanation:

Earth's surface, also known as "Land", has very many biotic(animals) and abiotic factors (plants). There are also a wide variety of land features such as mountain, plains, Hills, etc..

Within these features are small - Large ecosystems we're plants and animals thrive to create a bigger and stronger wildlife.

"Land" is a very simple word that stands for all of the different plants, mammals, ecosystems, aquatic animals and many more ways of life on Land.

I hope this helps...

3 0
2 years ago
Explique como são gravados (escrita) os bits zero ou um no HD.
rodikova [14]

Answer:

The following are the description of storing bits into Hard-disk.

Explanation:

As we know computer only know the binary language, that is in the form of zero's and once's "0's and 1's". In the hard drive, it requires a magnetically covered rotating disc, that's  "head" passes over its platter.

  • It marked 0's and 1's on the platter as tiny electronic areas in the north.
  • Its head goes to the very same location to read its information again, the north and south places pass there and assume from the 0s and 1s which are contained.

8 0
3 years ago
Other questions:
  • 1.6.6 Night out for codehs
    6·1 answer
  • Encryption is the process of:
    12·1 answer
  • Fortnite anyone? i just started tdy so dont be judgiee lol
    6·2 answers
  • Which of the following statements is false? a. InputStream and OutputStream are abstract classes for performing byte-based I/O.
    7·1 answer
  • Jenny is working on a laptop computer and notices that the computer is not running very fast. She looks and realizes that the la
    14·1 answer
  • List three features of the third generation of computers
    13·1 answer
  • Risk taker positive or negative​
    8·1 answer
  • Who invented the first mechanical computer? in what year was it invented?.
    11·1 answer
  • What are 3 of the most important things about internet safety that you would recommend and why
    15·1 answer
  • A 4"x6" photo is digitized using 10,000 pixels. An 11"x7" photo is digitized using 30,000 pixels. Which image will have the bett
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!