Write a simple tcp program for a client that reads a line

Assignment Help Computer Engineering
Reference no: EM132213384

Question :

Write a simple TCP program for a client that reads a line of text from its standard input (keyboard) and sends the line out its socket to the server.

The server reads the line from the socket and prints it in its standard output (screen). The server then reads a line from its standard input (keyboard) and sends it out its socket to the client. When the client sends "!" the server should reply back "bye" to the client and it closes the socket.

Sample Output Client:

Client: Hi there

Server: Hello

Client: How are you?

Server: I am fine

Client: ! Server: Bye

Reference no: EM132213384

Questions Cloud

Plot the function and the solution of the function : Write a simple MATLAB program to differentiate and integrate based off of the definitions for differentiation and integration.
Write a short c program along with a design tool : You are to write a short C program along with a design tool that will load an array with values, then search for a value using a linear search.
Create an if statement that is unconditionally true : Test whether variable x is even (An even number is an integer that is exactly divisible by 2) .if it is , increment x.
Take all the lines input to standard input and writes them : Write a short C++ program that takes all the lines input to standard input and writes them to standard output in reverse order.
Write a simple tcp program for a client that reads a line : Write a simple TCP program for a client that reads a line of text from its standard input (keyboard) and sends the line out its socket to the server.
A command-line parser to figure out what the user is trying : Your shell should use the fork system call and the execv system call (or one of its variants) to execute commands.
Write a short program that simulates rock or scissors : Use the Random class to create a random number generator, which the hand class will use, each game should be determined by the random number generator.
Prompt the user for some information about a car trip : Write a simple C++ program that prompts the user for some information about a car trip and then calculates some values based on what's entered.
Write a script to create the following directory structure : Write a script to create the following directory structure in a directory of user's choice.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Compute the sum of balances of all the customer accounts

The user has entered all the customer account data, use a for loop to compute the sum of balances of all the customer accounts in the array.

  Explain the action of the function

Describer the action of the function. What is the function in the library that performs a similar calculation.

  Create a use case model for using ms powerpoint

Develop and make a Use Case Model for using MS PowerPoint.

  Write a java program for client-server directory

The first two are for joining and leaving the list of players who are online and are willing to play. The last is to retrieve the list of online players.

  What software works with this

I am working on my midterm and we had to exchange images with texts hidden in them. I received a bmp.png file.

  Calculate the mean value and standard deviation of x

For t = 0 to 8?, take discrete sample data of the function x(t) with time interval of 0.025 sec, thus forming a dataset {x}.

  Write a program that inputs the empid and monthly salary

Write a program that inputs the empid and monthly salary of 10 employees. The program checks annual salary of each person.

  Desktop pc and a computer suitable as a web server

This solution provides the learner with an understanding of two and 3 tierd architectures and explains the role of each architecture. Futher this solution explain the main differences between a desktop PC and a computer suitable as a web server.

  Identify what you consider to be potential security threats

The system is maintained by the IT Department, and all IT personnel are located full-time at the main office where the FinanceWare system is housed.

  Draw an architecture of one computer that handle interrupts

Draw an architecture of one computer that will handle interrupts of different kinds, such as writing, opening, printing, spooling, and so forth.

  Early in 1999 hotel managers simon andrews and sybil jones

early in 1999 hotel managers simon andrews and sybil jones decided to leave one of the europes largest hotel chains and

  What does it mean for words to be syntagmatically related

What does it mean for words to be syntagmatically related? Give an example of syntagmatically related words?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd