Answer in C language is required. Task 1. Your task is to add required socket API calls
Fantastic news! We've Found the answer you've been seeking!
Question:
Answer in C language is required.
Transcribed Image Text:
Task 1. Your task is to add required socket API calls TCP and UDP server & client. After that, compile and run both server & client and understand the code. Task 2. Add the code (implemented in task 1) to TCP socket in the following tasks. Task 2 a). The client reads the text from file (line by line) and sends it to the server; the server sends an acknowledgement after receiving each line. Task 2 b). In this task, the client needs to read the data from the file and encrypt it. Requirements are: Read data from the file named as fileData.txt. Add 3 in all the lowercase letters of the data. . Add 2 in all the uppercase letters of the data. Add 1 in the numeric letter of the data. Send the encrypted data to the server for decryption. Requirements for the server are as follows: Receive data from the client. subtract 3 in all lowercase letters of the data. subtract 2 in all the uppercase letters of the data. subtract 1 in all the numeric letters of the data. Send back the decrypted data to the client. In the end, the client will show the decrypted data on the terminal sent by the server. Task 3. In this task, you are now required to write the code for a TCP iterative Server and Client, following the steps from flow, and run the TCP Client-Server programs. When the client is connected to Server, show its Port number in the terminal window. Client sends a file name to Server. Server sends the file to Client. After receiving the file, Client closes its connection with Server. But Server should keep running and now be ready to service a new Client request. Task 1. Your task is to add required socket API calls TCP and UDP server & client. After that, compile and run both server & client and understand the code. Task 2. Add the code (implemented in task 1) to TCP socket in the following tasks. Task 2 a). The client reads the text from file (line by line) and sends it to the server; the server sends an acknowledgement after receiving each line. Task 2 b). In this task, the client needs to read the data from the file and encrypt it. Requirements are: Read data from the file named as fileData.txt. Add 3 in all the lowercase letters of the data. . Add 2 in all the uppercase letters of the data. Add 1 in the numeric letter of the data. Send the encrypted data to the server for decryption. Requirements for the server are as follows: Receive data from the client. subtract 3 in all lowercase letters of the data. subtract 2 in all the uppercase letters of the data. subtract 1 in all the numeric letters of the data. Send back the decrypted data to the client. In the end, the client will show the decrypted data on the terminal sent by the server. Task 3. In this task, you are now required to write the code for a TCP iterative Server and Client, following the steps from flow, and run the TCP Client-Server programs. When the client is connected to Server, show its Port number in the terminal window. Client sends a file name to Server. Server sends the file to Client. After receiving the file, Client closes its connection with Server. But Server should keep running and now be ready to service a new Client request.
Expert Answer:
Related Book For
Calculus Of A Single Variable
ISBN: 9781337275361
11th Edition
Authors: Ron Larson, Bruce H. Edwards
Posted Date:
Students also viewed these computer network questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Barbara buys 100 shares of DEM at $35 a share and 200 shares of GOP at $40 a share. She buys on margin and the broker charges interest of 10 percent on the loan. a. If the margin requirement is 55...
-
Rockwell Inc. reported the following results for the year ended June 30, 20Y5: Retained earnings, July 1, 20Y4 ........................ $3,900,000 Net income...
-
Q-1) Find the largest domain in the z-plane where the function f(z) = Log[z + 4] z + i is analytic. Here, Log denotes the principal branch
-
To the right of z = 0.99 Find the indicated area under the standard normal curve. If convenient, use technology to find the area.
-
Fifty years ago, Grandma Bell purchased a set of gold plated dinnerware for $55, and last year you inherited it. Unfortunately a house fire at your home destroyed the set. Your insurance company is...
-
Summarize and include APA in-text citations: Christianity, like many religions, places a high value on compassion and self-sacrifice. These values can indeed influence a Christian woman's decisions...
-
AATMA Ltd. manufactures a product OM using a raw material M1. The company took Bank Overdraft at an interest rate of 15% p.a. specifically for the purpose of purchasing 10,000 kg. of material M1 at ...
-
In your opinion, should prosecutors' offices have to explain to the public why they declined to file charges in cases? What would be some ramifications of such a requirement?
-
What is the difference between convertible preferred shares and participating preferred shares?
-
Of the three models of prosecuting cases-horizontal model, vertical model, and mixed modelwhich do you think would be most appropriate for the prosecutor's office where you attend school?
-
What do you envision as the future of problem-solving courts? Will additional types of courts develop in the years to come? If so, what types of courts might these be?
-
Points \(A\) and \(B\) are on the same electric field line. If an electron is released and moves from A to \(\mathrm{B},\) (a) is the field directed from \(A\) to \(B\) or from \(B\) to \(A\) ? (b)...
-
What is intellectual property? Also, explain its types.
-
What is the maximum volume of 0.25 M sodium hypochlorite solution (NaOCl, laundry bleach) that can be prepared by dilution of 1.00 L of 0.80 M NaOCl?
-
Find a point on the ellipsoid 3x 2 + y 2 + 3z 2 = 1 where the tangent line is parallel to the plane -12x + 2y + 6z = 0.
-
Find the limit (if it exists). If it does not exist, explain why. 2 lim x-3+ x + 3
-
In Exercises 1114, sketch the region R whose area is given by the iterated integral. Then change the order of integration and show that both orders yield the same area. 3 3.0 9- dx dy
-
What critical elements are important to support the planning process?
-
Since the bar chart is ineffective as a planning and scheduling tool, why is it still widely used in the construction industry?
-
Develop a checklist of items to consider in development of the site plan for either the bridge project or the building project.
Study smarter with the SolutionInn App