Advanced socket concepts
Advanced socket concepts go beyond a general discussion of what sockets are and how they work. These concepts provide ways to design socket applications for larger and more complex networks.
- Asynchronous I/O
Asynchronous I/O APIs provide a method for threaded client/server models to perform highly concurrent and memory-efficient I/O. - Secure sockets
Currently, you have two methods to create secure socket applications on the i5/OS operating system. The SSL_ APIs and Global Secure Toolkit (GSKit) APIs provide communications privacy over an open communications network, which in most cases is the Internet. - Client SOCKS support
The i5/OS operating system supports SOCKS version 4. This enables programs that use the AF_INET address family with the SOCK_STREAM socket type to communicate with server programs running on systems outside a firewall. - Thread safety
A function is considered threadsafe if you can start it simultaneously in multiple threads within the same process. A function is threadsafe only if all the functions it calls are also threadsafe. Socket APIs consist of system and network functions, which are both threadsafe. - Nonblocking I/O
When an application issues one of the socket input APIs and there is no data to read, the API blocks and does not return until there is data to read. - Signals
An application program can request to be notified asynchronously (request that the system send a signal) when a condition that the application is interested in occurs. - IP multicasting
IP multicasting allows an application to send a single IP datagram that a group of hosts in a network can receive. - File data transfer—send_file() and accept_and_recv()
i5/OS sockets provide the send_file() and accept_and_recv() APIs that enable faster and easier file transfers over connected sockets. - Out-of-band data
Out-of-band (OOB) data is user-specific data that only has meaning for connection-oriented (stream) sockets. - I/O multiplexing—select()
Because asynchronous I/O provides a more efficient way to maximize your application resources, it is recommended that you use asynchronous I/O APIs rather than the select() API. However, your specific application design might allow select() to be used. - Socket network functions
Socket network functions allow application programs to obtain information from the host, protocol, service, and network files. - Domain Name System support
The operating system provides applications with access to the Domain Name System (DNS) through the resolver functions. - Berkeley Software Distribution compatibility
Sockets is a Berkeley Software Distribution (BSD) interface. - UNIX 98 compatibility
Created by The Open Group, a consortium of developers and venders, UNIX 98 improved the inter-operability of the UNIX operating system while incorporating much of the Internet-related function for which UNIX had become known. - Descriptor passing between processes: sendmsg() and recvmsg()
Passing an open descriptor between jobs allows one process (typically a server) to do everything that is required to obtain the descriptor, such as opening a file, establishing a connection, and waiting for the accept() API to complete. It also allows another process (typically a worker) to handle all the data transfer operations as soon as the descriptor is open. - Sockets-related User Exit Points
Sockets-related user exit points give an exit program the ability to prevent a specific sockets API from completing successfully.
Parent topic: Socket programming