subject

For the first part of this assignment, you will be implementing a TCP Server in tcpserver. c. TCP is an internet protocol that ensures reliable transmission of data between two packets. The servers job is to wait passively for tcp clients to connect to it. In general a TCP server goes through the following steps: Creation with a socket()
bind() the server to an addrses
listen() for client connections
accept() client connections
terminate()
Your Task:
For the tcpserver, you must implement the following features:
Be able to accept any number of client connections--however, only one client will be able to interact with the server at a given time.
i. e. There is only a 1:1 connection.
When client that connects to the server should be sent the message "You have reached the server"
When a client joins the server, the server prompt should print the socket descriptor that has joined.
e. g. "Client has joined: 5" (i. e. you are printing the socket descriptor out)
The server should print out all messages it receives from each of the clients.
The server will execute each message that it receives from a client.
i. e. When a client receives a message, it will fork() a new process and run the 'system' to try to run that command on the server.
(Note: In a security class, you may learn why this is unsafe).

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:00
Convert the quartstogallons class to an interactive application. instead of assigning a value to the number of quarts, accept the value from the user as input.
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
What are the different components of the cloud architecture?
Answers: 2
You know the right answer?
For the first part of this assignment, you will be implementing a TCP Server in tcpserver. c. TCP is...
Questions
question
Mathematics, 30.10.2020 16:50
question
Mathematics, 30.10.2020 16:50
Questions on the website: 13722367