TCP > Link > Three standard message formats @ spring > length-header / stx-etx / crlf
TCP通信などにおけるデータフォーマットに関して、<CR><LF>
や<STX><ETX>
などの使用について疑問に思った。
以下を見つけた。
Three standard message formats are provided for this purpose; you can also provide code for your own custom format.
- > The first of the three standard formats is length-header, in which case a 4 byte length header precedes the data;
- > The second is stx-etx in which the message data is preceded by an STX (0x02) character and terminated with an ETX (0x03) character.
- > The third is crlf in which the message is terminated with a carriage return and line feed (\r\n).
...
The length-header format can also handle binary data. The other two formats can only handle text data (specifcally, data that does not contain characters 0x02 and 0x03 for stx-etx and 0x0d and 0x0a for crlf). This limitation can be avoided by appropriate character escaping techniques in the application layer.
Author And Source
この問題について(TCP > Link > Three standard message formats @ spring > length-header / stx-etx / crlf), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/1c44f6df88733ee586c1著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .