You are here: Home > Specifications > Client Server Interaction
 

Home

Documentation

Downloads

Specifications

Credits


Client Server Interactions


        The primary function of the RFTP Server is to respond to the commands of the RFTP Client.  These commands, and the responses of the RFTP Server, are generally the commands and responses detailed for ftp in RFC 959.  One variation to the 959 syntax specification is to allow the resumption of a file transfer, which was not allowed in stream file transfer mode in the original specification.   Another variation to the established ftp syntax is to allow a "debug" mode which sets both the client and server software into a mode where debugging information is displayed on the screen.  

        Commands can be entered in either upper or lower case, because RftpConsoleInterface converts lower case commands to upper case.  However, the arguments may be case sensitive, especially if the server is a UNIX machine, because pathnames on UNIX are case sensitive.  Once the login process is complete, the commands may be entered in any order, but the session should always end with the quit command.

        RFTP follows the FTP RFC 959 specifications in the implementation of its socket connections.  This specifies how commands and data are to be transmitted between the client and the server. The command connection is established by RftpServer listening at a command socket, on port 2301. The command connection is opened one time for each client, and is not closed until the end of the session, when the client submits a QUIT command.  Its primary purpose is to send the client commands to the server and the servers responses back to the client.  However, some commands specify that the data be sent back to the client using the command connection.  

       The data connection is established with the RftpDataClient listening for the server, on port 2405. The data connection is treated differently than the command connection, because it is opened and closed for each command that uses it.  Data being transmitted may be as small as several characters of a filename, or a file of unlimited size.

       The RFTP Server responses follow the FTP RFC 959 specifications.  The response to a client command always starts with a three-digit number, followed by text giving an English language response indicating what has occurred.   The first digit of the reply indicates what type of response it is.

  First Digit  Meaning
2 The requested action has been completed successfully.
3 The requested action will be started when the RFTP Client sends further requested information.
4 The command wasn't accepted by the RFTP Server, but the RFTP Client may try the command again.  This reply is used in transient situations.  
5 The command was not accepted and the requested action did not occur.

      RftpClient supports the reception of multiple responses from the server to a single command.  These responses can consist of multiple command connection messages and data transmitted over the data connection.  For example, a single LIST command requesting that the contents of a directory be listed will receive the 150 and the 226 responses separately over the command connection:

  150 ***File status okay; about to open data connection.***

226 ***Closing data connection. Request Successful.***

       It will also receive a list of file names over the data connection.  RftpClient uses the meaning of the first digit to interpret what it is receiving in order to know whether to look for more data from the command connection or if the command has been completely processed by the server.

      The English language text following the three-digit identifier number is allowed by ftp specification to be worded as the developer desires.  To allow FrameFM to distinguish command responses from data, the English language command response is encoded with three asterisks beginning and following the text.  This format is specific to the needs of the graphical interface for RFTP, but still conforms to the ftp specification.

       Some of the detail below on what a command does is duplicated in the RFTP User's Guide.  However, the User's Guide provides examples of how to use the commands, which are not presented in this section, except for RETR and STOR, which are more complex than the other commands.  This Technical Specification details the possible responses from the RftpServer, which are not given in the User's Guide.  It also tells which connections are used for the command and gives implementation details not needed by the casual user.

      Some server responses are the same for many commands.  If a response to a command does not appear immediately following the command, it is listed in the General Server Error Responses at the end of this section.  

Top


You are here: Home > Specifications > Client Server Interaction
   

Home    Documentation     Downloads      Specifications      Credits