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’s end-user functionality is unchanged from Chapter 9. Except for a marked improvement in responsiveness, the application appears identical. Under the hood, significant revisions have been made to enable this responsiveness. Since the screens are pretty much the same, we jump straight to the code changes. But before we get to the code itself, we need to design our state machine at a more detailed level. Then we explore the implementation.

Designing the State Machine

Each time it receives a nilEvent, our application gives the FTP session a chance to send outbound commands, receive inbound responses, connect to and disconnect from servers, and update the state information. This is handled by the new FTP module function, PnpFtpProcess.

For network applications, we don’t necessarily want to wait for an event to occur. We want to be sure and give the application protocol stack a chance to handle network events. We do this by passing a valid timeout to EvtGetEvent. When this timeout expires, the application receives a nilEvent. When we read a transaction off the queue, it becomes the current transaction. ...

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