Stay organized with collections
Save and categorize content based on your preferences.
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
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()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-23 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2024-07-23 UTC.",
"state": ""
}