SlideShare a Scribd company logo
1 of 1
Download to read offline
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

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 V3John 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.pdforderfabfirki
 
2.communcation in distributed system
2.communcation in distributed system2.communcation in distributed system
2.communcation in distributed systemGd Goenka University
 
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 studentsnawejakhatar10063
 
Netcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaNetcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaRaghunath G
 
study-of-network-simulator.pdf
study-of-network-simulator.pdfstudy-of-network-simulator.pdf
study-of-network-simulator.pdfJayaprasanna4
 
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdfSHIVAM691605
 
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.pdfsecunderbadtirumalgi
 
E-business Infrastructure and Security
E-business Infrastructure and SecurityE-business Infrastructure and Security
E-business Infrastructure and SecurityKimmy 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.docxwkyra78
 
Pulse code modulation and Quantization
Pulse code modulation and QuantizationPulse code modulation and Quantization
Pulse code modulation and QuantizationMuhamamd Awaissaleem
 
How packet data travel over network
How packet data travel over networkHow packet data travel over network
How packet data travel over networkRaisa 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.pdfsolankeanna9
 
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.pdfsolankeanna9
 
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.pdfsolankeanna9
 
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.pdfsolankeanna9
 
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.pdfsolankeanna9
 
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.pdfsolankeanna9
 
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.pdfsolankeanna9
 
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.pdfsolankeanna9
 
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).pdfsolankeanna9
 
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.pdfsolankeanna9
 
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.pdfsolankeanna9
 

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

BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...Nguyen Thanh Tu Collection
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptxREPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptxmanishaJyala2
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdfVikramadityaRaj
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryEugene Lysak
 
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptxHVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptxKunal10679
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxNehaChandwani11
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Mark Carrigan
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Mohamed Rizk Khodair
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45MysoreMuleSoftMeetup
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...Krashi Coaching
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatmentsaipooja36
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Celine George
 

Recently uploaded (20)

BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptxREPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptxHVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
HVAC System | Audit of HVAC System | Audit and regulatory Comploance.pptx
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
Envelope of Discrepancy in Orthodontics: Enhancing Precision in Treatment
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 

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.