Docs

You are here:
Endpoints

All messages exchanged between the nodes pass through so called endpoints. An endpoint is like a logical gate that connects the services of each node. A good analogy to the TCP/IP stack would be comparing endpoints to network ports.

In RCM library, an endpoint is represented by rcm::Endpoint class. An endpoint is always associated with a rcm::Connection object. In order to send and receive messages, at least one endpoint needs to be registered withing the rcm::Connection object.

Registering endpoints

In order to register and endpoint call the rcm::Connection::registerEndpoint method passing the endpoint number. Valid endpoints number are from 1 to 239. Endpoint 0 is an internal RCM endpoint used for control traffic and endpoints above 239 are reserved for other usage.

Using endpoints

The rcm::Connection::registerEndpoint returns a new rcm::Endpoint object which can be used to send and receive messages (see Sending and receiving messages).

Each endpoint manages it's own message reception queue, that can be polled using rcm::Endpoint::getPendingMessage and rcm::Endpoint::getPendingMessagesCount methods.

In addition, each endpoint also includes a list of filters, that can be used to implement automatic message brokering (see Message filters).

Go to Top