@CHIP-RTOS - Programming client server applications
IPC@CHIP® Documentation Index
The most often used methods for programming TCP/IP applications are client or server applications. The term server applies to any process or program that offers a service that can be reached over the network. Servers accept request that arrive over the network, perform their service, and return the result to the requester (client).
An example for the simplest service is the standard echo server application. The server echoes the received data over the network back to the requester. A process becomes a client when its sends a request to a server and waits for an answer. The client-server model is the standard model for interprocess communication.
A TCP/IP stack provides two different methods for client-server connections, UDP and TCP.
1) UDP protocol:
This protocol realizes connectionless communication between a client and server, based on sending and receiving of single datagrams.
TCP/IP API calls used by a UDP client:
TCP/IP API calls used by a UDP server:
2) TCP protocol:
TCP/IP API calls used by a TCP server:
Examples with source code for programming UDP and TCP echo client/server applications can be found at www.beck-ipc.com.
All program examples are built with Beck C-Library functions declared in the library header files TCPIP.H and TCPIPAPI.H.
End of document