This chapter describes interactions with the Socket library, used for managing communications between threads -- threads on different machines or two GEOS threads on the same machine (via the "loopback" communication domain). It provides an API which is mostly independent of the medium used for inter-machine communication.
It is common to spawn a separate thread to poll a socket for incoming data; See the Multithreading chapter to learn about managing threads. Sample applications are located in APPL\SDK_C\MultThrd. Some socket operations require knowledge of the communications network used.
1 Introduction
2 Simple Example
3 Addresses
3.1 Letting the User Choose an Address
3.2 Managing Addresses
3.3 Hardware Ports
4 Making a Connection
5 Accepting a Connection
6 Loading on Connection
7 Sending and Receiving Data
7.1 Urgent Data
7.2 SocketSend() and SocketRecv()
7.3 Options
8 Closing the Connection
9 Checking the Connection
10 Domain-Specific Information
10.1 TCP/IP--GEOS Specific
10.2 TCP/IP--Standard
10.3 Loopback