FullyConnectedMesh Class Reference

Fully connected mesh plugin. This will connect RakPeer to all connecting peers, and all peers the connecting peer knows about. More...

#include <FullyConnectedMesh.h>

Inheritance diagram for FullyConnectedMesh:

PluginInterface List of all members.

Public Member Functions

void Initialize (const char *password)
 Plaintext encoding of the password. If you use a password, use secure connections.
virtual void OnDisconnect (RakPeerInterface *peer)
virtual void OnUpdate (RakPeerInterface *peer)
virtual int OnReceive (RakPeerInterface *peer, Packet *packet)
virtual bool PropagateToGame (Packet *packet) const
virtual void OnDataOverflow (RakPeerInterface *peer, Packet *packet)
 Too much data was in a packet. User should override in a derived class to handle this.
virtual void OnDataUnderflow (RakPeerInterface *peer, Packet *packet)
 Not enough data was in a packet. User should override in a derived class to handle this.
virtual void OnInvalidPacket (RakPeerInterface *peer, Packet *packet)
 Packet data that just doesn't make sense.
virtual void OnJoinMeshAuthorizationFailed (RakPeerInterface *peer, Packet *packet)
 Wrong password.
unsigned GetMeshPeerListSize (void) const
PlayerID GetPeerIDAtIndex (unsigned index)

Protected Member Functions

void HandleConnectionRequestAccepted (RakPeerInterface *peer, Packet *packet)
void HandleDroppedConnection (RakPeerInterface *peer, Packet *packet)
void HandleMeshJoinRequest (RakPeerInterface *peer, Packet *packet)
void HandleMeshJoinResponse (RakPeerInterface *peer, Packet *packet)
void AddUniquePeer (RakPeerInterface *peer, FCM_RemotePeer::FCM_RemotePeerState state, PlayerID playerId, bool remotelyKnown)
virtual void AppendMeshJoinAuthorization (RakNet::BitStream *bitStream)
virtual bool ValidateMeshJoinAuthorization (RakNet::BitStream *bitStream)
void SerializeRemotelyUnknownPeers (RakNet::BitStream *bitStream)
bool DeserializeMeshPeerList (RakPeerInterface *peer, RakNet::BitStream *bitStream)
void DeleteFromPeerList (PlayerID playerId)
void MarkAllRemotelyKnown (bool value)
int MeshPeerIndexFromPlayerID (PlayerID playerId)
void ConnectToNewlyListedServers (RakPeerInterface *peer)

Protected Attributes

char * pw
BasicDataStructures::List<
FCM_RemotePeer * > 
meshPeerList

Detailed Description

Fully connected mesh plugin. This will connect RakPeer to all connecting peers, and all peers the connecting peer knows about.


Member Function Documentation

void FullyConnectedMesh::OnDisconnect RakPeerInterface peer  )  [virtual]
 

Called when RakPeer is shutdown

Parameters:
[in] peer the instance of RakPeer that is calling Receive

Reimplemented from PluginInterface.

int FullyConnectedMesh::OnReceive RakPeerInterface peer,
Packet packet
[virtual]
 

OnReceive is called for every packet.

Parameters:
[in] peer the instance of RakPeer that is calling Receive
[in] packet the packet that is being returned to the user
Returns:
2 to absorb but do not deallocate the packet, 1 to absorb and automatically deallocate the packet, 0 to allow the packet to propagate to another handler, or to the game

Reimplemented from PluginInterface.

void FullyConnectedMesh::OnUpdate RakPeerInterface peer  )  [virtual]
 

OnUpdate is called every time a packet is checked for .

Parameters:
[in] peer - the instance of RakPeer that is calling Receive

Reimplemented from PluginInterface.

bool FullyConnectedMesh::PropagateToGame Packet packet  )  const [virtual]
 

PropagateToGame tells RakPeer if a particular packet should be sent to the game or notIf you create a custom packet ID just for this handler you would not want to propagate it to the game, for example

Parameters:
[in] id The first byte of the packet in question
Return values:
true (default) Allow a packet to propagate to the game
Returns:
false Only let the packet be sent to message handlers

Reimplemented from PluginInterface.


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 20:32:55 2006 for RakNet by  doxygen 1.4.6-NO