#include <Router.h>
Inheritance diagram for Router:
Public Member Functions | |
void | SetRestrictRoutingByType (bool restrict) |
void | AddAllowedType (unsigned char messageId) |
void | RemoveAllowedType (unsigned char messageId) |
void | SetConnectionGraph (DataStructures::WeightedGraph< ConnectionGraph::PlayerIdAndGroupId, unsigned short, false > *connectionGraph) |
bool | Send (char *data, unsigned bitLength, PacketPriority priority, PacketReliability reliability, char orderingChannel, SystemAddressList *recipients) |
bool | Send (const char *data, unsigned bitLength, PacketPriority priority, PacketReliability reliability, char orderingChannel, PlayerID playerId) |
virtual void | OnAttach (RakPeerInterface *peer) |
virtual void | OnDetach (RakPeerInterface *peer) |
virtual void | OnDisconnect (RakPeerInterface *peer) |
virtual void | Update (RakPeerInterface *peer) |
virtual PluginReceiveResult | OnReceive (RakPeerInterface *peer, Packet *packet) |
virtual void | OnCloseConnection (RakPeerInterface *peer, PlayerID playerId) |
Protected Member Functions | |
void | SendTree (PacketPriority priority, PacketReliability reliability, char orderingChannel, DataStructures::Tree< ConnectionGraph::PlayerIdAndGroupId > *tree, const char *data, unsigned bitLength, RakNet::BitStream *out, SystemAddressList *recipients) |
void | SerializePreorder (DataStructures::Tree< ConnectionGraph::PlayerIdAndGroupId > *tree, RakNet::BitStream *out, SystemAddressList *recipients) const |
Protected Attributes | |
DataStructures::WeightedGraph< ConnectionGraph::PlayerIdAndGroupId, unsigned short, false > * | graph |
bool | restrictByType |
DataStructures::OrderedList< unsigned char, unsigned char > | allowedTypes |
RakPeerInterface * | rakPeer |
|
If types are restricted, this adds an allowed message type to be routed
|
|
Called when the interface is attached
Reimplemented from PluginInterface. |
|
Called when a connection is dropped because the user called RakPeer::CloseConnection() for a particular system
Reimplemented from PluginInterface. |
|
Called when the interface is detached
Reimplemented from PluginInterface. |
|
Called when RakPeer is shutdown
Reimplemented from PluginInterface. |
|
OnReceive is called for every packet.
Reimplemented from PluginInterface. |
|
Removes a restricted type previously added with AddRestrictedType
|
|
Sends a bitstream to one or more systems. If multiple systems are specified, the message will be multicasted using a minimum spanning tree
|
|
Set the connection graph, which is a weighted graph of the topology of the network. You can easily get this from the ConnectionGraph plugin. See the 'router' sample for usage. This is necessary if you want to send (not necessary just to route).
|
|
We can restrict what kind of messages are routed by this plugin. This is useful for security, since you usually want to restrict what kind of messages you have to worry about from (as an example) other clients in a client / server system
|
|
Update is called every time a packet is checked for .
Reimplemented from PluginInterface. |