Jenkins Software

Router Overview

Send messages through intermediate systems

Games often have a need to send to remote systems through an intermediate system, where the intermediate system itself does not act upon the data. That is to say, the intermediate system is just a relay. To make this easier, the Router plugin will do this automatically. To use, attach one instance of the Router plugin to each system. THe sending system needs to also have the ConnectionGraph plugin installed in order to determine the path to use to send through.

Once the router plugin is installed, you can use Router::Send() function to send to more than one system at a time efficiently. Or you can also use RakPeerInterface::Send() to send as usual.

Sample applications:

  • Sending chat messages through a server between players
  • Having a distributed server cluster communicate with a client directly connected to another server in the cluster
  • Using the RakVoice plugin without requiring clients to directly connect to each other (not recommended for more than few clients due to bandwidth constraints).

Note: Reliabile messaging when using the Router plugin only applies to each immediate connection in the routing path. Should a system drop while routing a message, that message will be lost even if another path would have been available had the message been resent. For guaranteed delivery, connect the systems directly, or send your own acks to confirm delivery.

See Also
Index