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_participantis 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 participantis 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 participantis 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()
    
   
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2024-10-28 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-28 UTC."],[],[]]