Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

One of the messages that the client above sends is 0 bytes long. What would happen on a tcp socket when sending this message? When

image text in transcribed

One of the messages that the client above sends is 0 bytes long. What would happen on a tcp socket when sending this message?

When using TCP to send a stream of individual messages, why is it still possible to send a 0-byte message (and receive it on the other side)? (For example, you can put an empty file on a website and download it. Why?)

When running the programs using "./example_server 4000" and "./example_client 127.0.0.1 4000" on the same machine I get the following output: $ /example_server 4000 msg 1: Hi msg 2: Hi again msg 3: Why am I just saying 'Hi' msg 4: Why are you not answering $ ./example_client 127.0.0.1 4000 msg 1: Hi msg 2: Hi again msg 3: Why am I just saying 'Hi'? msg 4: Why are you not answering? msg 6: Bye. msg 5: Explain why the output differs! Propose changes to the code to make the programs work as intended

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability & Statistics For Engineers & Scientists

Authors: Ronald E. Walpole, Raymond H. Myers, Sharon L. Myers, Keying

7th Edition

9789813131279, 130415294, 9813131276, 978-0130415295

Students also viewed these Databases questions