Inspirel banner

Programming Distributed Systems with YAMI4

6.1 Listeners

Each agent can manage zero or more listeners.

The listener represents the connection target for remote agents and in the case of TCP is associated with a physical listening socket.

Listeners can be added to and removed from the existing agent at any time.

A typical server program creates one or more listeners during its initialization phase. After that, it is ready to accept incoming connections, which is automatically handled by the agent.

Purely client-oriented programs do not need to create any listeners.

Listeners are identified by their resolved target names, which are generated when the listener is created. The resolved name can be generated at creation time based on the addressing information obtained from the operating system and in some cases can be different than the name that was provided by user code. This possibility influences the way clients get to know about connection points in respective servers and in practice two possible approaches can be identified:

Note:

To allow users experiment with different listener formats, all example programs that are provided with the YAMI4 distribution use a common convention where server programs print their resolved target names to their standard output and client programs expect the target as their first parameter.

6.1.1 TCP Listeners

6.1.2 SSL Listeners

6.1.3 UDP Listeners

6.1.4 Unix Listeners

6.1.5 Ada

6.1.6 C++

6.1.7 Java

6.1.8 .NET

6.1.9 Python