SlideShare a Scribd company logo
You will use the ICP echo client and server code (for IPv4 version) trom Donahoo. You will
modify the code to do the following. Instead of transmitting a string (passed from the command
line) from client to server, you will pass a text file as a command line argument, and transmit the
contents of that file to the sender line by line, including line numbers. (Sample file is attached to
Canvas). The rest of the arguments will remain the same. While sending data, client will echo it
line by line to the screen, along with line numbers. Please keep in mind that your program should
work with any file, not just the one that was provided, so hard-coding will not be a good idea.
The server will receive the entire file, buffer it until it has the entire contents, and then reverse it
and echo (print) it to the standard output (screen). Each revesed line of text will have the correct
line number. The last character of the original file will be the first one in the reversed version
except line numbes. After that you will print a goodbye message from both the client and the
server and close the connection. It is up to you to figure out the details. There are several
different solutions to this problem, and everyone's solution may be different. I do recommend
that you review how to read from files in C and go over the code line by line following the
Chapter 2 in Donahoo. Example output Client output: Sending data to < I P address of the server
here > : 1. Hotel California 2. .... (the rest of the file line by line including blank lines and line
numbers) Goodbye!!!!! Server output: Received data from < IP address of the client > : 34. 33.
Goodbye! C AddressUtility.c C DiewithMessage.c C Practical.h song.txt C TCPClientUtility.c C
TCPEchoClient.c C TCPEchoserver.c C TCPServerUtility.c Hotel California On a dark desert
highway, cool wind in my hair Warm smell of colitas, rising up through the air Up ahead in the
distance, I saw a shimmering light My head grew heavy and my sight grew dim I had to stop for
the night There she stood in the doorway I heard the mission bell And I was thinking to myself
"This could be Heaven or this could be Hell" Then she lit up a candle and she showed me the
way There were voices down the corridor I thought I heard them say Welcome to the Hotel
California Such a lovely place (Such a lovely place) Such a lovely face Plenty of room at the
Hotel California Any time of year (Any time of year) You can find it here Her mind is Tiffany-
twisted, she got the Mercedes bends She got a lot of pretty, pretty boys she calls friends How
they dance in the courtyard, sweet summer sweat Some dance to remember, some dance to
forget.

More Related Content

Similar to You will use the ICP echo client and server code (for IPv4 version) tr.pdf

Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
sehrish saba
 
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
John Mathias
 
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdfFigure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
orderfabfirki
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
Gd Goenka University
 
Image compression
Image compressionImage compression
Image compression
Bassam Kanber
 
Web and internet technology notes for BCA students
Web and internet technology notes for BCA studentsWeb and internet technology notes for BCA students
Web and internet technology notes for BCA students
nawejakhatar10063
 
Netcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army KnifeNetcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army Knife
n|u - The Open Security Community
 
Netcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaNetcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beema
Raghunath G
 
study-of-network-simulator.pdf
study-of-network-simulator.pdfstudy-of-network-simulator.pdf
study-of-network-simulator.pdf
Jayaprasanna4
 
adapters2.PPT
adapters2.PPTadapters2.PPT
adapters2.PPT
ssuser8298f2
 
MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
MOHD. SHAHRUKH BHATI
 
Tcp Udp Notes
Tcp Udp NotesTcp Udp Notes
Tcp Udp Notes
Ram Dutt Shukla
 
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
SHIVAM691605
 
Rpc (Distributed computing)
Rpc (Distributed computing)Rpc (Distributed computing)
Rpc (Distributed computing)
Sri Prasanna
 
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP  #inc.pdfCODE FOR echo_client.c A simple echo client using TCP  #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
secunderbadtirumalgi
 
Ch02.pdf
Ch02.pdfCh02.pdf
Ch02.pdf
Test835033
 
E-business Infrastructure and Security
E-business Infrastructure and SecurityE-business Infrastructure and Security
E-business Infrastructure and Security
Kimmy Chen
 
Project 4 (P4) Distance Vector Routing (DV)Instructor Dr.docx
Project 4 (P4) Distance Vector Routing (DV)Instructor Dr.docxProject 4 (P4) Distance Vector Routing (DV)Instructor Dr.docx
Project 4 (P4) Distance Vector Routing (DV)Instructor Dr.docx
wkyra78
 
Pulse code modulation and Quantization
Pulse code modulation and QuantizationPulse code modulation and Quantization
Pulse code modulation and Quantization
Muhamamd Awaissaleem
 
How packet data travel over network
How packet data travel over networkHow packet data travel over network
How packet data travel over network
Raisa Anjani
 

Similar to You will use the ICP echo client and server code (for IPv4 version) tr.pdf (20)

Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
Unit 10 Assignment_2_Sig_Theory_and_Data Elements V3
 
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdfFigure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
Figure 3 TCP Session Hijacking Attack victims to execute the mali.pdf
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed system
 
Image compression
Image compressionImage compression
Image compression
 
Web and internet technology notes for BCA students
Web and internet technology notes for BCA studentsWeb and internet technology notes for BCA students
Web and internet technology notes for BCA students
 
Netcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army KnifeNetcat - 101 Swiss Army Knife
Netcat - 101 Swiss Army Knife
 
Netcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaNetcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beema
 
study-of-network-simulator.pdf
study-of-network-simulator.pdfstudy-of-network-simulator.pdf
study-of-network-simulator.pdf
 
adapters2.PPT
adapters2.PPTadapters2.PPT
adapters2.PPT
 
MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
 
Tcp Udp Notes
Tcp Udp NotesTcp Udp Notes
Tcp Udp Notes
 
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
 
Rpc (Distributed computing)
Rpc (Distributed computing)Rpc (Distributed computing)
Rpc (Distributed computing)
 
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP  #inc.pdfCODE FOR echo_client.c A simple echo client using TCP  #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
 
Ch02.pdf
Ch02.pdfCh02.pdf
Ch02.pdf
 
E-business Infrastructure and Security
E-business Infrastructure and SecurityE-business Infrastructure and Security
E-business Infrastructure and Security
 
Project 4 (P4) Distance Vector Routing (DV)Instructor Dr.docx
Project 4 (P4) Distance Vector Routing (DV)Instructor Dr.docxProject 4 (P4) Distance Vector Routing (DV)Instructor Dr.docx
Project 4 (P4) Distance Vector Routing (DV)Instructor Dr.docx
 
Pulse code modulation and Quantization
Pulse code modulation and QuantizationPulse code modulation and Quantization
Pulse code modulation and Quantization
 
How packet data travel over network
How packet data travel over networkHow packet data travel over network
How packet data travel over network
 

More from solankeanna9

You have to find a way to tie in ALL of the following topics in your m.pdf
You have to find a way to tie in ALL of the following topics in your m.pdfYou have to find a way to tie in ALL of the following topics in your m.pdf
You have to find a way to tie in ALL of the following topics in your m.pdf
solankeanna9
 
You hold a cup of soup when your hand is supinates retracted protracte.pdf
You hold a cup of soup when your hand is supinates retracted protracte.pdfYou hold a cup of soup when your hand is supinates retracted protracte.pdf
You hold a cup of soup when your hand is supinates retracted protracte.pdf
solankeanna9
 
You interrupt DNA replication in E- coli in order to isolate Okazaki f.pdf
You interrupt DNA replication in E- coli in order to isolate Okazaki f.pdfYou interrupt DNA replication in E- coli in order to isolate Okazaki f.pdf
You interrupt DNA replication in E- coli in order to isolate Okazaki f.pdf
solankeanna9
 
you inoculate an EMB agar plate with an unknown organism-After inocula.pdf
you inoculate an EMB agar plate with an unknown organism-After inocula.pdfyou inoculate an EMB agar plate with an unknown organism-After inocula.pdf
you inoculate an EMB agar plate with an unknown organism-After inocula.pdf
solankeanna9
 
You will make changes to the class called ReadFile- Complete the proga.pdf
You will make changes to the class called ReadFile- Complete the proga.pdfYou will make changes to the class called ReadFile- Complete the proga.pdf
You will make changes to the class called ReadFile- Complete the proga.pdf
solankeanna9
 
You were given a sputum sample from a patient- Design an experiment on.pdf
You were given a sputum sample from a patient- Design an experiment on.pdfYou were given a sputum sample from a patient- Design an experiment on.pdf
You were given a sputum sample from a patient- Design an experiment on.pdf
solankeanna9
 
You treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdf
You treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdfYou treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdf
You treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdf
solankeanna9
 
You roll a standard die until you get the number 4 - Round probabiliti.pdf
You roll a standard die until you get the number 4 - Round probabiliti.pdfYou roll a standard die until you get the number 4 - Round probabiliti.pdf
You roll a standard die until you get the number 4 - Round probabiliti.pdf
solankeanna9
 
You oversee the Surgical Center for the only hospital in your communit (1).pdf
You oversee the Surgical Center for the only hospital in your communit (1).pdfYou oversee the Surgical Center for the only hospital in your communit (1).pdf
You oversee the Surgical Center for the only hospital in your communit (1).pdf
solankeanna9
 
You notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdf
You notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdfYou notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdf
You notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdf
solankeanna9
 
You must analyze the entities identified including the bridges- - Enti.pdf
You must analyze the entities identified including the bridges- - Enti.pdfYou must analyze the entities identified including the bridges- - Enti.pdf
You must analyze the entities identified including the bridges- - Enti.pdf
solankeanna9
 

More from solankeanna9 (11)

You have to find a way to tie in ALL of the following topics in your m.pdf
You have to find a way to tie in ALL of the following topics in your m.pdfYou have to find a way to tie in ALL of the following topics in your m.pdf
You have to find a way to tie in ALL of the following topics in your m.pdf
 
You hold a cup of soup when your hand is supinates retracted protracte.pdf
You hold a cup of soup when your hand is supinates retracted protracte.pdfYou hold a cup of soup when your hand is supinates retracted protracte.pdf
You hold a cup of soup when your hand is supinates retracted protracte.pdf
 
You interrupt DNA replication in E- coli in order to isolate Okazaki f.pdf
You interrupt DNA replication in E- coli in order to isolate Okazaki f.pdfYou interrupt DNA replication in E- coli in order to isolate Okazaki f.pdf
You interrupt DNA replication in E- coli in order to isolate Okazaki f.pdf
 
you inoculate an EMB agar plate with an unknown organism-After inocula.pdf
you inoculate an EMB agar plate with an unknown organism-After inocula.pdfyou inoculate an EMB agar plate with an unknown organism-After inocula.pdf
you inoculate an EMB agar plate with an unknown organism-After inocula.pdf
 
You will make changes to the class called ReadFile- Complete the proga.pdf
You will make changes to the class called ReadFile- Complete the proga.pdfYou will make changes to the class called ReadFile- Complete the proga.pdf
You will make changes to the class called ReadFile- Complete the proga.pdf
 
You were given a sputum sample from a patient- Design an experiment on.pdf
You were given a sputum sample from a patient- Design an experiment on.pdfYou were given a sputum sample from a patient- Design an experiment on.pdf
You were given a sputum sample from a patient- Design an experiment on.pdf
 
You treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdf
You treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdfYou treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdf
You treat Arabidopsis seed with ethyl methanesulphonate (EMS)- In a pa.pdf
 
You roll a standard die until you get the number 4 - Round probabiliti.pdf
You roll a standard die until you get the number 4 - Round probabiliti.pdfYou roll a standard die until you get the number 4 - Round probabiliti.pdf
You roll a standard die until you get the number 4 - Round probabiliti.pdf
 
You oversee the Surgical Center for the only hospital in your communit (1).pdf
You oversee the Surgical Center for the only hospital in your communit (1).pdfYou oversee the Surgical Center for the only hospital in your communit (1).pdf
You oversee the Surgical Center for the only hospital in your communit (1).pdf
 
You notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdf
You notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdfYou notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdf
You notice that Coca-Cola has a stock price of $41-25 and EPS of $1-71.pdf
 
You must analyze the entities identified including the bridges- - Enti.pdf
You must analyze the entities identified including the bridges- - Enti.pdfYou must analyze the entities identified including the bridges- - Enti.pdf
You must analyze the entities identified including the bridges- - Enti.pdf
 

Recently uploaded

NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
Payaamvohra1
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
How to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in useHow to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in use
Celine George
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 

Recently uploaded (20)

NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
How to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in useHow to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in use
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 

You will use the ICP echo client and server code (for IPv4 version) tr.pdf

  • 1. You will use the ICP echo client and server code (for IPv4 version) trom Donahoo. You will modify the code to do the following. Instead of transmitting a string (passed from the command line) from client to server, you will pass a text file as a command line argument, and transmit the contents of that file to the sender line by line, including line numbers. (Sample file is attached to Canvas). The rest of the arguments will remain the same. While sending data, client will echo it line by line to the screen, along with line numbers. Please keep in mind that your program should work with any file, not just the one that was provided, so hard-coding will not be a good idea. The server will receive the entire file, buffer it until it has the entire contents, and then reverse it and echo (print) it to the standard output (screen). Each revesed line of text will have the correct line number. The last character of the original file will be the first one in the reversed version except line numbes. After that you will print a goodbye message from both the client and the server and close the connection. It is up to you to figure out the details. There are several different solutions to this problem, and everyone's solution may be different. I do recommend that you review how to read from files in C and go over the code line by line following the Chapter 2 in Donahoo. Example output Client output: Sending data to < I P address of the server here > : 1. Hotel California 2. .... (the rest of the file line by line including blank lines and line numbers) Goodbye!!!!! Server output: Received data from < IP address of the client > : 34. 33. Goodbye! C AddressUtility.c C DiewithMessage.c C Practical.h song.txt C TCPClientUtility.c C TCPEchoClient.c C TCPEchoserver.c C TCPServerUtility.c Hotel California On a dark desert highway, cool wind in my hair Warm smell of colitas, rising up through the air Up ahead in the distance, I saw a shimmering light My head grew heavy and my sight grew dim I had to stop for the night There she stood in the doorway I heard the mission bell And I was thinking to myself "This could be Heaven or this could be Hell" Then she lit up a candle and she showed me the way There were voices down the corridor I thought I heard them say Welcome to the Hotel California Such a lovely place (Such a lovely place) Such a lovely face Plenty of room at the Hotel California Any time of year (Any time of year) You can find it here Her mind is Tiffany- twisted, she got the Mercedes bends She got a lot of pretty, pretty boys she calls friends How they dance in the courtyard, sweet summer sweat Some dance to remember, some dance to forget.