Client or server mode

The adapter operates either as the client or server of the socket connection. Server mode is only applicable to an input event. If the mode flag is not specified, the default is client.

In client mode, the listener or input card will connect to the specified remote socket.

In server mode, the listener creates the socket and waits for client connections to attach and send data. On the arrival of a message, a thread is spawned to read the message and process it.

Generally, if multiple cards in a map connect to the same port having the same -HOST and -PORT or -SERVICE then the same socket connection should be used in each card.