Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# Multiplayer< InterfaceType > Class Template Reference

Abstract Multiplayer Class. More...

`#include <Multiplayer.h>`

List of all members.

## Public Member Functions
| Multiplayer ()
virtual | ~Multiplayer ()
virtual void | ProcessPackets (InterfaceType *interfaceType)
## Protected Member Functions
virtual void | ReceiveRemoteDisconnectionNotification (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveRemoteConnectionLost (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveRemoteNewIncomingConnection (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveRemoteExistingConnection (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveRemoteStaticData (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveConnectionBanned (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveConnectionRequestAccepted (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveNewIncomingConnection (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveConnectionResumption (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveNoFreeIncomingConnections (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveDisconnectionNotification (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveConnectionLost (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceivedStaticData (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveInvalidPassword (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveModifiedPacket (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveRemotePortRefused (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveVoicePacket (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceivePong (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveAdvertisedSystem (Packet *packet, InterfaceType *interfaceType)
virtual void | ProcessUnhandledPacket (Packet *packet, unsigned char packetIdentifier, InterfaceType *interfaceType)
virtual void | ReceiveDistributedNetworkObject (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveDistributedNetworkObjectCreationAccepted (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveDistributedNetworkObjectCreationRejected (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveAutopatcherRequestFileList (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveAutopatcherFileList (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveAutopatcherRequestFiles (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveAutopatcherSetDownloadList (Packet *packet, InterfaceType *interfaceType)
virtual void | ReceiveAutopatcherWriteFile (Packet *packet, InterfaceType *interfaceType)
## Static Protected Member Functions
static unsigned char | GetPacketIdentifier (Packet *packet)

## Detailed Description

### template<class InterfaceType>
class Multiplayer< InterfaceType >

Abstract Multiplayer Class.

Inherit from this class to make your application. This class handle for you all RakNet internal. You only have to override some method to have the network layer of your application working.

## Constructor & Destructor Documentation

template<class InterfaceType>
Multiplayer< InterfaceType >::Multiplayer | ( |  | ) |

| Default Constructor

template<class InterfaceType>
Multiplayer< InterfaceType >::~Multiplayer | ( |  | ) | `[virtual]`

| Destructor

## Member Function Documentation

template<class InterfaceType>
static unsigned char Multiplayer< InterfaceType >::GetPacketIdentifier | ( | Packet * | packet | ) | `[static, protected]`

  | Given a packet, returns the packet identifier. Parameters:
  | packet | the packet to parse for the identifier
Returns: the packet identifier Note: No need to override this if you have more than 256 packet type including those builtin RakNet you have to define your own Multiplayer class.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ProcessPackets | ( | InterfaceType * | interfaceType | ) | `[virtual]`

  | Call this every frame Reads any packets from the network, handles the native messages, and sends user defined messages to ProcessUnhandledPacket Parameters:
  | interfaceType | The communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ProcessUnhandledPacket | ( | Packet * | packet,
|  | unsigned char | packetIdentifier,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You must override this function in your application All user defined packets are sent to this function. Parameters:
  | packet | The received packet
  | packetIdentifier | The packet identifier
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveAdvertisedSystem | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle ads Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveAutopatcherFileList | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Autopacher Internal You do not need to override this function Handle file list receive Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveAutopatcherRequestFileList | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Autopacher Internal You do not need to override this function Handle file list request Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveAutopatcherRequestFiles | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Autopacher Internal You do not need to override this function Handle file request Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveAutopatcherSetDownloadList | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Autopacher Internal You do not need to override this function Handle set download list request Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveAutopatcherWriteFile | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Autopacher Internal You do not need to override this function Handle write file request Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveConnectionBanned | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle banned by peer event Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveConnectionLost | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle lost connection Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveConnectionRequestAccepted | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle new connection accepted Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveConnectionResumption | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle reconnection Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveDisconnectionNotification | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle disconnection notification Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveDistributedNetworkObject | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Distributed objects Internal You do not need to override this function Handle distributed object creation Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveDistributedNetworkObjectCreationAccepted | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Distributed objects Internal You do not need to override this function Handle creation accepted Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveDistributedNetworkObjectCreationRejected | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Distributed objects Internal You do not need to override this function Handle creation reject packet Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceivedStaticData | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle static data reception Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveInvalidPassword | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle invalid password response Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveModifiedPacket | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle modified packet Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveNewIncomingConnection | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle new incomming connection Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveNoFreeIncomingConnections | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle Reject incomming connection (two many clients already connected) Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceivePong | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle pong receive Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveRemoteConnectionLost | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle remote peer connection have been lost Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveRemoteDisconnectionNotification | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle remote peer have disconnected Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveRemoteExistingConnection | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle already connected event. Might occured if the reconnection occured before the remote host detect the disconnection. Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveRemoteNewIncomingConnection | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle remote peer accept a new connection Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveRemotePortRefused | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle port refused Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveRemoteStaticData | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle reception of remote static data Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

template<class InterfaceType>
void Multiplayer< InterfaceType >::ReceiveVoicePacket | ( | Packet * | packet,
|  | InterfaceType * | interfaceType
| ) | `[protected, virtual]`

  | Note: You probably want to override this function in your application Handle voice Parameters:
  | packet | The received packet
  | interfaceType | the communication end point to use.

The documentation for this class was generated from the following file:

- Projects/raknet/include/raknet/Multiplayer.h