Reliable byte stream
From Wikipedia, the free encyclopedia
A reliable byte stream is a byte stream in which the bytes which emerge from the communication channel at the recipient are exactly the same, and in the exact same order, as the sender inserted into the channel.
[edit] Explanation
Communication protocols which implement reliable byte streams, generally over some unreliable lower level, use a number of mechanisms to provide the reliability. All data items are identified with a sequence number, which is used both to make sure that the data are delivered to the entity at the other end in the correct order, and to check for lost data items. The receiver sends back acknowledgements for data items which have been successfully received; a timer at the sender will cause a timeout if an acknowledgement is not received within a reasonable round trip time, and the (presumably lost) data will then be re-transmitted. To check that no data items are damaged, a checksum is used; one is computed at the sender for each block of data before it is sent, and checked at the receiver. Erroneous or missing data are reported to the sender, in order that it may retransmit the same. Any duplicated data items are discarded.
The classic example of a reliable byte-stream protocol is the Transmission Control Protocol.