Internet Daemon

The Internet Daemon is a socket application that creates and monitors sockets with remote nodes on the Internet and then starts Internet server applications that process the specific communications protocol used with the remote nodes. Once a connection is made, the Internet server application communicates with the remote node on the Internet directly.

Internet server applications are also socket applications. For example, a Trivial File Transfer Protocol (TFTP) server, a File Transfer Protocol (FTP) server, and a Hypertext Transfer Protocol (HTTP) server are socket applications.

The Internet Daemon is a long-running process that consists of two major components:
  • The Internet Daemon monitor, which is responsible for starting and stopping the Internet Daemon listeners for Internet server applications and for error recovery when an Internet Daemon listener fails
  • An Internet Daemon listener, which monitors the Internet server applications and, with some process models, creates and monitors a socket for the Internet server application.

There are process models that define the interface to the Internet Daemon based on the level of control needed by an Internet server application. There are subtle differences in the functions used by the Internet Daemon, which relate to the level of control that results.

The WAIT, NOWAIT, or DAEMON process model provides synchronous control because the tpf_fork function is used to create a child process for which the z/TPF system sends a SIGCHLD signal to the parent process when the child process ends. The DAEMON process model differs from the WAIT and NOWAIT process models in that the Internet Daemon does not create or monitor sockets.

The AOA process model offers asynchronous control for TCP servers by using the activate_on_accept function. The Internet Daemon issues the first activate_on_accept function call. When the first remote client connects, your TCP server application is activated in a new ECB. Your server application must issue the next activate_on_accept function call. The Internet Daemon continues to monitor the server application and listener socket.

The AOA2 process model offers asynchronous control for TCP servers by using the activate_on_accept function. The Internet Daemon issues all activate_on_accept function calls. When the remote client connects, your TCP server application is activated in a new ECB. The Internet Daemon continues to monitor the server application and listener socket.

The SSL process model offers asynchronous control for SSL servers by using the activate_on_accept function. The Internet Daemon issues all activate_on_accept function calls. When the remote client connects, your SSL server application is activated in a new ECB. The Internet Daemon continues to monitor the server application, listener socket, and CTX.

The AOR process model provides asynchronous control because the activate_on_receipt or activate_on_receipt_with_length function is used. When a remote client connects, the Internet Daemon issues an activate_on_receipt or activate_on_receipt_with_length function to pass control of the new socket to your TCP server application when the first message is received from the remote client.

The NOLISTEN process model does not provide any control; the swisc_create function is used to create an independent ECB.