Sample Application

Our sample application acts as both a Daytime client and a Daytime server. It sends requests to Daytime servers and responds to requests from Daytime clients. If your Palm OS device is connected to a network, your could check the time on it from other hosts on the network.

Functional Description

When the application starts, it looks like FtpView, except the form title and button labels have changed. Figure 13-3 shows the initial form.

Daytime peer main screen (initial)

Figure 13-3. Daytime peer main screen (initial)

The form title is now Daytime.013. There are new buttons on the form, Run and Preferences. The Preferences button launches a modal form that allows you to change the hostname of the Daytime server used by the client. The Preferences form is shown in Figure 13-4.

Daytime peer preferences screen

Figure 13-4. Daytime peer preferences screen

The Run button starts the Daytime session. If we have not yet connected to the network, we connect now. The user is warned that connecting to the network might take a fair amount of time. Figure 13-5 shows the application connecting to the network.

Connecting to the network

Figure 13-5. Connecting to the network

Once we are connected to the network, the client begins sending requests to the specified Daytime server. ...

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.