gpg::IRealTimeEventListener

This is an abstract class.

#include <i_real_time_event_listener.h>

Defines an interface that can deliver events relating to real-time multiplayer.

Summary

Constructors and Destructors

~IRealTimeEventListener()

Public functions

OnConnectedSetChanged(const RealTimeRoom & room)=0
virtual void
OnConnectedSetChanged is called when a MultiplayerParticipant object connects or disconnects from the room's connected set.
OnDataReceived(const RealTimeRoom & room, const MultiplayerParticipant & from_participant, std::vector< uint8_t > data, bool is_reliable)=0
virtual void
OnDataReceived is called whenever data is received from another MultiplayerParticipant.
OnP2PConnected(const RealTimeRoom & room, const MultiplayerParticipant & participant)=0
virtual void
OnP2PConnected is called when a MultiplayerParticipant object connects directly to the local player.
OnP2PDisconnected(const RealTimeRoom & room, const MultiplayerParticipant & participant)=0
virtual void
OnP2PDisconnected is called when a MultiplayerParticipant object disconnects directly from the local player.
OnParticipantStatusChanged(const RealTimeRoom & room, const MultiplayerParticipant & participant)=0
virtual void
OnParticipantStatusChanged is called when a MultiplayerParticipant object's Status() method returns an update.
OnRoomStatusChanged(const RealTimeRoom & room)=0
virtual void
OnRoomStatusChanged is called when a RealTimeRoom object's Status() method returns an update.

Public functions

OnConnectedSetChanged

virtual void OnConnectedSetChanged(
  const RealTimeRoom & room
)=0

OnConnectedSetChanged is called when a MultiplayerParticipant object connects or disconnects from the room's connected set.

Details
Parameters
room
The room whose connected set changed.

OnDataReceived

virtual void OnDataReceived(
  const RealTimeRoom & room,
  const MultiplayerParticipant & from_participant,
  std::vector< uint8_t > data,
  bool is_reliable
)=0

OnDataReceived is called whenever data is received from another MultiplayerParticipant.

Details
Parameters
room
The room in which from_participant is located.
from_participant
The participant who sent the data.
data
The data which was recieved.
is_reliable
Whether the data was sent using the unreliable or reliable mechanism.

OnP2PConnected

virtual void OnP2PConnected(
  const RealTimeRoom & room,
  const MultiplayerParticipant & participant
)=0

OnP2PConnected is called when a MultiplayerParticipant object connects directly to the local player.

Details
Parameters
room
The room in which the participant is located.
participant
The participant that connected.

OnP2PDisconnected

virtual void OnP2PDisconnected(
  const RealTimeRoom & room,
  const MultiplayerParticipant & participant
)=0

OnP2PDisconnected is called when a MultiplayerParticipant object disconnects directly from the local player.

Details
Parameters
room
The room in which the participant is located.
participant
The participant that disconnected.

OnParticipantStatusChanged

virtual void OnParticipantStatusChanged(
  const RealTimeRoom & room,
  const MultiplayerParticipant & participant
)=0

OnParticipantStatusChanged is called when a MultiplayerParticipant object's Status() method returns an update.

Details
Parameters
room
The room which participant is in.
participant
The participant whose status changed.

OnRoomStatusChanged

virtual void OnRoomStatusChanged(
  const RealTimeRoom & room
)=0

OnRoomStatusChanged is called when a RealTimeRoom object's Status() method returns an update.

Details
Parameters
room
The room whose status changed.

~IRealTimeEventListener

virtual  ~IRealTimeEventListener()

傳送您對下列選項的寶貴意見...

這個網頁
Play Games Services for C++
Play Games Services for C++