Sample Application

In this chapter, we extend our sample application FtpView to log in to and out of the FTP server. This involves connecting to the server, sending the USER and PASS commands, and receiving and handling responses. FTP login and logout provide excellent examples of exchanging data across the network.

Application Startup

Figure 9-2 shows the screen after the application has initialized. From a user input perspective, little has changed. In Chapter 8, on the initial screen, the log table contains quite a few messages. In this chapter’s version, the log table has only one entry. There is also a “Connect” button at the bottom of the screen in Chapter 8. This has been replaced with the login button. At the top right of the screen is a new pop-up trigger labeled “FTP,” as shown in Figure 9-2.

Sample application at startup

Figure 9-2. Sample application at startup

We have added an FTP log to the networking one. The FTP log is filled with events such as initialization, sending commands, and receiving responses. The Network log is filled with events such as connecting to the network, resolving host and service names, and sending or receiving data. The networking events are the details of the associated FTP events.

On startup, the FTP log has only one entry. If we look at the network log, we see that quite a few events have been logged. Figure 9-3 shows the network log for application startup.

Figure 9-3. Sample ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.