148k views
1 vote
We have seen that Internet TCP sockets treat the data being sent as a byte stream but UDP sockets recognize message boundaries. What are one advantage and one disadvantage of byte-oriented API versus having the API explicitly recognize and preserve application-defined message boundaries

User Yvanna
by
5.2k points

1 Answer

0 votes

Answer:

One advantage of byte-oriented APIs is that all byte of the data sent by the API is retrieved but for APIs with application-defined message boundaries, some bytes of data could be lost in the streaming process.

One disadvantage of byte-oriented APIs is the time it takes to resend a byte increases its propagation delay, while the is an advantage of the APIs with application-defined message boundaries as it does not have to resend any lost bytes of data, making it faster.

Step-by-step explanation:

Note that byte-oriented APIs uses the TCP socket which resends lost bytes of data and application-defined message boundaries APIs uses the UDP protocol to send data but does not resend if lost.

User Nerdboy
by
4.4k points