Socket programming

A socket is a communications connection point (endpoint) that you can name and address in a network.

The processes that use a socket can reside on the same system or on different systems on different networks. Sockets are useful for both stand-alone and network applications. Sockets allow you to exchange information between processes on the same machine or across a network, distribute work to the most efficient machine, and they easily allow access to centralized data. Socket application program interfaces (APIs) are the network standard for TCP/IP. A wide range of operating systems support socket APIs. i5/OS™ sockets support multiple transport and networking protocols. Socket system functions and the socket network functions are threadsafe.

Socket programming shows how to use socket APIs to establish communication links between remote and local processes. Programmers who use Integrated Language Environment® (ILE) C can use the information to develop socket applications. You can also code to the sockets API from other ILE languages, such as RPG.

Java™ also supports a socket programming interface.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.