O'Reilly logo

Palm OS Network Programming by Greg Winton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 11.3.4.6.

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required