Example Sockets Programs

These are the full program examples from which snippets were taken for the tutorial.

Unix

C
Web Client
Generic C client application that uses the sockets API. Includes use of getaddrinfo() to allow for IPv4 and/or IPv6 connections as well as a possible service name rather than port number.

Windows

Lua
Web Client
Lua web client application that uses the Lua sockets API.
ooREXX
Web Client
REXX web client application that uses the ooREXX sockets API. Includes use of select() to cancel a wait for data that may never arrive.

IBM zOS

IBM REXX
Web Client
REXX web client application that uses the IBM REXX sockets API.
IBM HPNS
Web Client
HLASM web client application that uses the IBM HPNS synchronous (APITYPE=2) sockets API.

 

Sockets
Contents
Contents