8. Communications Using TCPIP: HTTP and Sockets

< BACK  NEXT >
[oR]

Chapter 8. Communications Using TCP/IP: HTTP and Sockets

Windows CE provides a rich variety of communications techniques for transferring data between a Windows CE device and desktop PCs or servers. Selecting the most appropriate communications technique is important. If you are developing a "companion" application (that is, an application that shares data with a desktop application, in the same way that Pocket Word and Word for Windows share data), you should use either ActiveSync (see Chapter 17), or perhaps RAPI (the Remote Application Programming Interface, see Chapter 10). If your application needs to communicate directly with another application running on a desktop PC or server, you should consider using TCP/IP (Transmission Control Protocol/Internet Protocol) sockets. Sockets can also be used for communicating with other compatible devices using infrared. Finally, if you need to transfer data to and from a server (for example, data from a server-based database), HTTP (HyperText Transfer Protocol) can be used. TCP/IP sockets and HTTP are the subject of this chapter.

TCP/IP is now the most widely used network protocol and is the only protocol supported as standard with Windows CE. TCP/IP communications techniques provide the widest possible connection options, including the following:

  • LAN (Local Area Network) or WAN (Wide Area Network) connections using PCMCIA or Compact Flash network cards

  • Dialup connections to servers or the Internet via modems (either landline-based or wireless) using PPP (Point to Point Protocol)

  • Infrared connections with compatible devices

  • Serial connections to a desktop PC, again using PPP

The solutions possible with TCP/IP communications are endless, including the following:

  • Dialing into an enterprise server from a remote location and transferring data from a database. The data can then be stored locally (for example, in a property database, see Chapter 4) for later use.

  • Connecting to the Internet and downloading pages from a web site. Your application could process the data, or simply display it in a browser.

  • Moving data between Windows CE devices.

  • Transferring data captured on a Windows CE device to a remote server.

One of the most difficult issues to address is keeping data on a Windows CE device synchronized with data on a remote server or PC. Windows CE devices are typically connected for brief periods of time and are, for the most part, disconnected from the network. ActiveSync (see Chapter 17) deals with this issue elegantly, but can only be used effectively with a desktop PC, and this desktop PC can only be used to synchronize a limited number of Windows CE devices. If you are downloading data from, say, an enterprise database, you will need to factor into your designs how to store the data locally and how to synchronize data changes.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net