Overview of TCP/IP CommunicationsThe whole area of TCP/IP communications is large and complex. This chapter will cover essential TCP/IP topics relevant to Windows CE devices. TCP/IP provides reliable communication of data. IP (Internet Protocol) defines how data is broken into packets and delivered. TCP (Transmission Control Protocol) provides the mechanism to ensure that the packets are organized into the correct order. Nearly all communications a programmer is likely to come across are carried out through sockets. A socket on a client device can connect to a socket on a server device, and, once connected, reliable two-way transfer of data can be made. Writing code to communicate through sockets is discussed later in this chapter. Two important pieces of information must be provided when communicating through sockets:
When communicating using sockets, the programmer defines how the data will be packaged. The data, for example a serialized C++ class or a structure, can be sent as text or binary. Standard protocols (such as HTTP) define how the data will be packaged and specify a protocol to be used between the client and server for communicating requests and data.
|