Skip to Main Content
Palm OS Programming, 2nd Edition
book

Palm OS Programming, 2nd Edition

by Julie McKeehan, Neil Rhodes
October 2001
Intermediate to advanced content levelIntermediate to advanced
704 pages
19h 33m
English
O'Reilly Media, Inc.
Content preview from Palm OS Programming, 2nd Edition

TCP/IP Communications

Now it is time to look at TCP/IP. In this section, we will do the following:

  • Discuss the API for networking on a Palm device

  • Give you some programming tips for using TCP/IP

  • Use TCP/IP in a small sample application that sends email to a Simple Mail Transfer Protocol (SMTP) server

Network API

The Palm OS (2.0 or later) contains a net library that provides network services, such as TCP/IP, to applications. With this library, an application on the Palm device can connect to any other machine on a network using standard TCP/IP protocols. The API for this library is a socket interface modeled closely on the Berkeley Sockets API.

Tip

This section provides a brief introduction to network programming on the Palm OS. For more in-depth coverage, see Palm OS Network Programming, by Greg Winton (O’Reilly).

Berkeley Sockets API

Sockets are a communication mechanism. Information is sent into a socket on one machine and comes out of a socket on a remote machine (and vice versa). With a connection-oriented socket interface, you can establish the connection between the two machines prior to sending data. The connection stay opens whether or not data is sent. A good example of this is TCP. Sockets also allow a connectionless mode for sending datagrams. These can be sent to an address without any prior connection using a protocol such as the User Datagram Protocol (UDP).

Tip

For a brief introduction to Berkeley Sockets and socket programming, see http://www.ibrado.com/sock-faq/ ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Palm OS Network Programming

Palm OS Network Programming

Greg Winton
Palm Programming: The Developer's Guide

Palm Programming: The Developer's Guide

Neil Rhodes, Julie McKeehan

Publisher Resources

ISBN: 1565928563Errata Page