Daemon Client Socket—Establishing Connections
The Rendezvous daemon (rvd
) and the Rendezvous routing daemon (rvrd
) both open a client socket to establish communication with their clients (Rendezvous programs). The -listen
option to rvd
and rvrd
lets you specify where the daemon should listen for new client connections. Conversely, Rendezvous programs request connections with the daemon at that client socket. The daemon
parameter of the transport creation function determines how and where to find the Rendezvous daemon and establish communication.
Each transport object establishes a communication conduit with a Rendezvous daemon, as described in these steps:
Procedure
1. | The daemon process opens a (TCP) client socket, and waits for a client to request a connection. |
The -listen
option of the Rendezvous daemon specifies where the daemon listens for new client transports.
2. | The program calls the transport creation function, which contacts the daemon at the client socket specified in its daemon parameter. |
The daemon
parameter of the transport creation function must correspond to the ‑listen
option of the daemon process; that is, they must specify the same communication type and socket number.
If no daemon process is listening on the specified client socket, then the transport creation call automatically starts a new daemon process (which listens on the specified client socket) and then attempts to connect to it.
3. | The daemon process opens a conduit for private communication with the new transport. All future communication uses that private conduit. |
The request socket is now free for additional requests from other client transports.