2

我目前正在我的一个项目(ftp 客户端部分)上实现 ftp 协议。我正在关注RFC959

在这个 RFC 中,我面临一个问题:转义字符,事实上,它描述它必须使用转义字符。但我不知道具体的字符是什么。

这是 RFC 关于转义字符的部分:

     3.4.1.  STREAM MODE

     The data is transmitted as a stream of bytes.  There is no
     restriction on the representation type used; record structures
     are allowed.

     In a record structured file EOR and EOF will each be indicated
     by a two-byte control code.  The first byte of the control code
     will be all ones, the escape character.  The second byte will
     have the low order bit on and zeros elsewhere for EOR and the
     second low order bit on for EOF; that is, the byte will have
     value 1 for EOR and value 2 for EOF.  EOR and EOF may be
     indicated together on the last byte transmitted by turning both
     low order bits on (i.e., the value 3).  If a byte of all ones
     was intended to be sent as data, it should be repeated in the
     second byte of the control code.

     If the structure is a file structure, the EOF is indicated by
     the sending host closing the data connection and all bytes are
     data bytes.

有谁知道是什么性格?

一般来说,你有一些关于如何告诉 FTP 服务器我已经完成发送文件的线索吗?

提前谢谢你。

4

1 回答 1

5

“控制代码的第一个字节将是全1,即转义字符。” - 换句话说 - 0xff

于 2012-12-07T10:25:25.953 回答