4.10 Streams and Message (p.67)
No record boundaries exist - reads and writes do not examine the data at all. The data is a byte stream with no interpretation done by the system. If any interpretation is desired, the writing process and the reading process must agree to it a priori and do it themselves.
1.Special termination sequence in-band: many Unix applications use the newline character to delineate each message.
2.Explicit length: each record is preceded by its length. One advantage to this technique is that escaping a delimiter that appears in the data is unnecessary, because the receiver does not need to scan all the data,looking for the end of each record.
3.One record per connection: the application closes the connection to its peer to indicate the end of a record. The requires a new connection for every record, but is used with HTTP 1.0.
只會用不會說果然不是真懂阿...