Sample Application

FtpView acts as a TCP server on the data connection, and it binds to an ephemeral port on the local IP address. It informs the FTP server, which is the TCP client on the data connection, of the IP address and port number of this connection with a PORT command. We discuss this command later in Section

Application Startup

FtpView is essentially unchanged through successful login to an FTP server. The login process itself is the same as in Chapter 10. Once we are logged in, however, things begin to change. The new screen is shown in Figure 11-5.

FtpView after login

Figure 11-5. FtpView after login

In addition to the Logout button, there is a new List button. When the user presses the List button, FtpView retrieves the FTP server’s directory listing. You will see activity on the FTP log as the PORT and LIST commands are sent and the data is received.

When the listing is received, FtpView displays the results to the user. These results are shown in a primitive dialog. We are more concerned with the mechanics of receiving them than we are with creating a compelling user interface. The directory screen is presented in Figure 11-6.

FtpView server directory listing

Figure 11-6. FtpView server directory listing

At first, this may look like something is very wrong with the data exchange. But, in fact, the problem is ...

Get Palm OS Network Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.