Computers and Technology

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).

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, naomi20044
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
image
Computers and Technology, 24.06.2019 15:30, livagrace
Emma is using an artificial intelligence system, which contains information on botany, to identify a type of plant from an image. what type of ai is emma using?
Answers: 1
image
Computers and Technology, 24.06.2019 16:30, saadshami2384
You may see the term faq on websites which stands for frequently asked questions this is an example of which type of mnemonic? a) poem b) acronym c) acrostic d) abbreviation ken has dipped many dark chocolate marshmallows (which you remember the metric system distance units in decreasing order: kilometers, hectometer, decameter, centimeter, millimeter) is an example of which type of mnemonic? a) poem b) acronym c) acrostic d) abbreviation !
Answers: 1
image
Computers and Technology, 24.06.2019 17:30, leenzazou98241
What is the next step if your volume does not work on computer
Answers: 2
Do you know the correct answer?
For the first part of this assignment, you will be implementing a TCP Server in tcpserver. c. TCP is...

Questions in other subjects: