January 2018
Beginner to intermediate
454 pages
10h 8m
English
A client connects to a server and then sends commands to the server. Each command receives an answer from the server with either a success or failure.
For example, the client will send the PWD command to the server:
=> PWD\r\n <= 257 "/"\r\n
Here, the server answered 257 (which literally means pathname created) and then gave the current working directory the client is in (which is "/", in this case).
As you can see, every command ended with "". This is another standard in FTP—every command has to end with "". In case you don't know, "" stands for carriage return and "" stands for the backline.
Another thing to note—the answer from the server always contains a string before the "". Consider the following example:
=> NOOP\r\n ...