![]() |
Diarkis C++Client Library API Document
|
Interface class for Room function. More...
#include <room.h>
Public Member Functions | |
virtual | ~IDiarkisRoom () |
Destructor for the IDiarkisField class. More... | |
virtual void | SetLoggerFactory (const std::shared_ptr< IDiarkisLoggerFactory > &loggerFactory, const Diarkis::StdString &loggerNameSuffix)=0 |
Register a logger. More... | |
virtual bool | SetupAsTcp (const std::shared_ptr< IDiarkisTcp > &tcp)=0 |
Set up Room as a TCP protocol. More... | |
virtual bool | SetupAsUdp (const std::shared_ptr< IDiarkisUdp > &udp)=0 |
Set up Room as a UDP protocol. More... | |
virtual bool | SetTcp (const std::shared_ptr< IDiarkisTcp > &tcp)=0 |
Set up Room as a TCP protocol. More... | |
virtual bool | SetUdp (const std::shared_ptr< IDiarkisUdp > &udp)=0 |
Set up Room as a UDP protocol. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomCreationEventArgs & > > | GetCreateEvent ()=0 |
Get the callback event called when a Room is created. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomJoinEventArgs & > > | GetJoinEvent ()=0 |
Get the callback event called when joined a Room. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomSuccessEventArgs & > > | GetLeaveEvent ()=0 |
Get the callback event called when left from a Room. More... | |
virtual std::shared_ptr< IDiarkisEvent< void * > > | GetMigrateStartEvent ()=0 |
Get the callback event called when a Room migration starts. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomMigrateCompleteEventArgs & > > | GetMigrateCompleteEvent ()=0 |
Get the callback event called when a Room migration completes. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetMemberJoinEvent ()=0 |
Gets the callback event called when another client joins the Room. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetMemberLeaveEvent ()=0 |
Gets the callback event called when a member left from a Room. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetMemberBroadcastEvent ()=0 |
Get the callback event called when a Broadcacst message is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetMemberMessageEvent ()=0 |
Get the callback event called when a message by MessageTo is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetMemberExclusiveBroadcastEvent ()=0 |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetMemberExclusiveMessageEvent ()=0 |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomSuccessEventArgs & > > | GetUpdatePropertiesEvent ()=0 |
Get the callback event called when properties are updated with UpdateProperties. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomPropertiesEventArgs & > > | GetGetPropertiesEvent ()=0 |
Get the callback event called when properties are retrieved with GetProperties. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomPropertiesEventArgs & > > | GetUpdateSyncPropertiesEvent ()=0 |
Get the callback event called when properties are updated with UpdateProperties. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomIncrementPropertyEventArgs & > > | GetIncrementPropertyEvent ()=0 |
Get the callback event called when the property is changed with IncrementProperty. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomIncrementPropertySyncEventArgs & > > | GetIncrementPropertySyncEvent ()=0 |
Get the callback event called when the property is changed with IncrementProperty. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomGetOwnerIDEventArgs & > > | GetOwnerIDEvent ()=0 |
Get the callback event called when the user ID of the owner of a participating Room is retrieved. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomMemberIDsEventArgs & > > | GetMemberIDSEvent ()=0 |
Get the callback event called when the user IDs of the members participating in the Room are retrieved. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomNumberOfMembersEventArgs & > > | GetNumberOfMembersEvent ()=0 |
Get the callback event called to get the number of members in a Room. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomPayloadEventArgs & > > | GetRegisterEvent ()=0 |
Get the callback event called when additional information is registered for a participating Room. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomFindByTypeEventArgs & > > | GetFindByTypeEvnet ()=0 |
Gets the callback event called when the results of a FindRoomsByType are received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomPayloadEventArgs & > > | GetReserveEvent ()=0 |
Get the callback event called when a response to Reserve is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomPayloadEventArgs & > > | GetCancelReservationEvent ()=0 |
Get the callback event called when a response to CancelReservation is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomPayloadEventArgs & > > | GetChatSyncResponseEvent ()=0 |
Get the callback event called when a response to a chat transmission is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomChatEventArgs & > > | GetChatSyncEvent ()=0 |
Get the callback event called when chat is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomChatLogEventArgs & > > | GetChatLogEvent ()=0 |
Get the callback event called when a response to GetChatLog is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisP2PEventArgs & > > | GetStartP2PSyncEvent ()=0 |
Get the callback event called when StartP2PSync push notification is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomGetOwnerIDEventArgs & > > | GetOwnerChangeEvent ()=0 |
Get the callback event called when the Room owner is changed. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomObjectUpdateEventArgs & > > | GetObjectUpdateEvent ()=0 |
Get the callback event called when a UpdateObject push is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisRoomObjectUpdateResponseEventArgs & > > | GetObjectUpdateResponseEvent ()=0 |
Get the callback event called when a UpdateObject response is received. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetRelayEvent ()=0 |
Get the callback event called when received a message by Relay. More... | |
virtual std::shared_ptr< IDiarkisEvent< const DiarkisPayloadEventArgs & > > | GetRelayToEvent ()=0 |
Get the callback event called when received a message by RelayTo. More... | |
virtual std::shared_ptr< IDiarkisEvent< void * > > | GetOfflineEvent ()=0 |
Get the callback event called when the server is ready to shutdown. More... | |
virtual Diarkis::System::Result | Create (uint16_t maxMembers, bool allowEmpty, bool join, uint16_t ttl, uint32_t interval=200)=0 |
Create a new Room. More... | |
virtual Diarkis::System::Result | Join (const char *roomID, const uint8_t *message, size_t messageSize)=0 |
Join a Room. More... | |
virtual Diarkis::System::Result | Join (const Diarkis::StdString &roomID, const Diarkis::StdVector< uint8_t > &message)=0 |
Same as Join() More... | |
virtual Diarkis::System::Result | JoinRandom (uint16_t maxMembers, uint16_t ttl, const uint8_t *message, size_t messageSize, uint32_t interval=200, bool allowEmpty=false)=0 |
Join the Room if available, otherwise create a new Room. More... | |
virtual Diarkis::System::Result | JoinRandom (uint16_t maxMembers, uint16_t ttl, const Diarkis::StdVector< uint8_t > &message, uint32_t interval=200, bool allowEmpty=false)=0 |
Same as JoinRandom() More... | |
virtual Diarkis::System::Result | Leave (const char *roomID, const uint8_t *message, size_t messageSize)=0 |
Leaving a Room. More... | |
virtual Diarkis::System::Result | Leave (const Diarkis::StdString &roomID, const Diarkis::StdVector< uint8_t > &message)=0 |
Same as Leave() More... | |
virtual Diarkis::System::Result | BroadcastTo (const char *roomID, const uint8_t *message, size_t messageSize, bool reliable=true)=0 |
Sends a message to all Room members including yourself. More... | |
virtual Diarkis::System::Result | BroadcastTo (const Diarkis::StdString &roomID, const Diarkis::StdVector< uint8_t > &message, bool reliable=true)=0 |
Same as BroadcastTo() More... | |
virtual Diarkis::System::Result | ExclusiveBroadcastTo (const Diarkis::StdString &roomID, const Diarkis::StdVector< uint8_t > &message, bool reliable=true)=0 |
virtual Diarkis::System::Result | ExclusiveBroadcastTo (const char *roomID, const uint8_t *message, size_t messageSize, bool reliable=true)=0 |
virtual Diarkis::System::Result | ExclusiveMessageTo (const Diarkis::StdString &roomID, const Diarkis::StdVector< Diarkis::StdString > &memberIDs, const Diarkis::StdVector< uint8_t > &message, bool reliable=true)=0 |
virtual Diarkis::System::Result | ExclusiveMessageTo (const char *roomID, const char **memberIDs, size_t memberIDsCount, const uint8_t *message, size_t messageSize, bool reliable=true)=0 |
virtual Diarkis::System::Result | MessageTo (const char *roomID, const char **memberIDs, size_t memberIDsCount, const uint8_t *message, size_t messageSize, bool reliable=true)=0 |
Sends a message to a specific member who has joined a Room. More... | |
virtual Diarkis::System::Result | MessageTo (const Diarkis::StdString &roomID, const Diarkis::StdVector< Diarkis::StdString > &memberIDs, const Diarkis::StdVector< uint8_t > &message, bool reliable=true)=0 |
Same as MessageTo() More... | |
virtual Diarkis::System::Result | Relay (const uint8_t *message, size_t messageSize, bool reliable=true)=0 |
Sends a message to Room members other than yourself. More... | |
virtual Diarkis::System::Result | Relay (const Diarkis::StdVector< uint8_t > &message, bool reliable=true)=0 |
Same as Relay() More... | |
virtual Diarkis::System::Result | RelayTo (const char *roomID, const char **memberIDs, size_t memberIDsCount, const uint8_t *message, size_t messageSize, bool reliable=true)=0 |
Sends a message to a specific member participating in a Room. More... | |
virtual Diarkis::System::Result | RelayTo (const Diarkis::StdString &roomID, const Diarkis::StdVector< Diarkis::StdString > &memberIDs, const Diarkis::StdVector< uint8_t > &message, bool reliable=true)=0 |
Same as RelayTo() More... | |
virtual Diarkis::System::Result | UpdateProperties (const char *roomID, const Diarkis::StdUnorderedMap< Diarkis::StdString, Diarkis::StdVector< uint8_t >> &properties, bool sync=false)=0 |
Set Room properties. More... | |
virtual Diarkis::System::Result | UpdateProperties (const Diarkis::StdString &roomID, const Diarkis::StdUnorderedMap< Diarkis::StdString, Diarkis::StdVector< uint8_t >> &properties, bool sync=false)=0 |
Same as UpdateProperties() More... | |
virtual Diarkis::System::Result | GetProperties (const char *roomID, const char **propertyNames, size_t propertyCount)=0 |
Get Room properties. More... | |
virtual Diarkis::System::Result | GetProperties (const Diarkis::StdString &roomID, const Diarkis::StdVector< Diarkis::StdString > &propertyNames)=0 |
Same as GetProperties() More... | |
virtual Diarkis::System::Result | IncrementProperty (const char *propertyName, int64_t delta, bool sync)=0 |
Increases or decreases the value of the specified Room property. More... | |
virtual Diarkis::System::Result | IncrementProperty (Diarkis::StdString propertyName, int64_t delta, bool sync)=0 |
Same as IncrementProperty() More... | |
virtual Diarkis::System::Result | GetOwnerID ()=0 |
Get the Room owner's user ID. More... | |
virtual Diarkis::System::Result | GetMemberIDs ()=0 |
Get a list of user IDs of members participating in a Room. More... | |
virtual Diarkis::System::Result | GetNumberOfMembers (const char *roomID)=0 |
Get the number of members in the Room. More... | |
virtual Diarkis::System::Result | GetNumberOfMembers (const Diarkis::StdString &roomID)=0 |
Same as GetNumberOfMembers() More... | |
virtual Diarkis::System::Result | Migrate ()=0 |
Migrate the Room to another server. More... | |
virtual Diarkis::System::Result | Move (Diarkis::StdString roomID_, const Diarkis::StdVector< uint8_t > &leaveMessage, const Diarkis::StdVector< uint8_t > &joinMessage)=0 |
Leaves the Room that the client is currently in and joins a new Room. Raises OnLeave and OnJoin and remotely raises OnMemberLeave and OnMemberJoin. You may callback use the callback instead of listening to the regular events. callback An optional callback to be invoked when successfully joined a new Room or failed to leave or join. More... | |
virtual Diarkis::System::Result | Register (uint32_t roomType, const char *roomName, const char *roomMetadata)=0 |
Register information to be added to Room. More... | |
virtual Diarkis::System::Result | Register (uint32_t roomType, const Diarkis::StdString &roomName, const Diarkis::StdString &roomMetadata)=0 |
Same as Register() More... | |
virtual Diarkis::System::Result | FindRoomsByType (uint32_t roomType, uint32_t limit)=0 |
Searches for rooms of the same type. More... | |
virtual Diarkis::System::Result | Reserve (const char **userIDs, size_t userIDsSize)=0 |
Reserves a member to join a Room. More... | |
virtual Diarkis::System::Result | Reserve (const Diarkis::StdVector< Diarkis::StdString > &userIDs)=0 |
Same as Reserve() More... | |
virtual Diarkis::System::Result | CancelReservation (const char *cancelRoomID, const char **userIDs, size_t userIDsSize)=0 |
Cancels a Room reservation. More... | |
virtual Diarkis::System::Result | CancelReservation (const Diarkis::StdString &cancelRoomID, const Diarkis::StdVector< Diarkis::StdString > &userIDs)=0 |
Same as CancelReservation() More... | |
virtual Diarkis::System::Result | CancelReservation (const Diarkis::StdVector< Diarkis::StdString > &userIDs)=0 |
Cancel a reservation for a Room you are currently in. More... | |
virtual Diarkis::System::Result | SendChatMessage (const char *message)=0 |
Sends a chat message to the Room members. More... | |
virtual Diarkis::System::Result | SendChatMessage (const Diarkis::StdString &message)=0 |
Same as SendChatMessage() More... | |
virtual Diarkis::System::Result | GetChatLog ()=0 |
Retrieve past chat messages. More... | |
virtual Diarkis::System::Result | StartP2PSync (uint8_t linkedClients=0)=0 |
Starts P2P communication with the members participating in the Room. More... | |
virtual Diarkis::System::Result | UpdateObject (RoomObjectMode mode, const Diarkis::StdString &name, const Diarkis::StdUnorderedMap< Diarkis::StdString, double > &obj, bool reliable=true)=0 |
Updates the Room object. More... | |
virtual const Diarkis::StdString & | GetRoomID ()=0 |
Get the Room ID of the Room you are participating in. More... | |
virtual void | SetRoomID (const char *roomID)=0 |
Set the Room ID of the Room. More... | |
virtual void | SetRoomID (const Diarkis::StdString &roomID)=0 |
Same as SetRoomID() More... | |
virtual void | RegisterCustomMessagePush (uint8_t version, uint16_t command, std::function< void(const Diarkis::StdVector< uint8_t > &)> callback)=0 |
Register custom message functions. More... | |
Interface class for Room function.
Functions for using Room are declared.
|
inlinevirtual |
Destructor for the IDiarkisField class.
|
pure virtual |
Register a logger.
[in] | loggerFactory | Pointer to IDiarkisLoggerFactory |
[in] | loggerNameSuffix | String to be added to the tag that will be output to the log |
|
pure virtual |
Set up Room as a TCP protocol.
Setup event listeners such as OnPush and OnResponse as well.
|
pure virtual |
Set up Room as a UDP protocol.
Setup event listeners such as OnPush and OnResponse as well.
|
pure virtual |
Set up Room as a TCP protocol.
|
pure virtual |
Set up Room as a UDP protocol.
|
pure virtual |
Get the callback event called when a Room is created.
callback event is called when a Room Create response is received.
|
pure virtual |
Get the callback event called when joined a Room.
callback event is called when a Room Join response is received.
|
pure virtual |
Get the callback event called when left from a Room.
callback event is called when a Room Leave response is received.
|
pure virtual |
Get the callback event called when a Room migration starts.
This event is notified to all Room members by Migrate executed by the Room owner.
|
pure virtual |
Get the callback event called when a Room migration completes.
|
pure virtual |
Gets the callback event called when another client joins the Room.
|
pure virtual |
Gets the callback event called when a member left from a Room.
|
pure virtual |
Get the callback event called when a Broadcacst message is received.
|
pure virtual |
Get the callback event called when a message by MessageTo is received.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Get the callback event called when properties are updated with UpdateProperties.
|
pure virtual |
Get the callback event called when properties are retrieved with GetProperties.
|
pure virtual |
Get the callback event called when properties are updated with UpdateProperties.
|
pure virtual |
Get the callback event called when the property is changed with IncrementProperty.
|
pure virtual |
Get the callback event called when the property is changed with IncrementProperty.
|
pure virtual |
Get the callback event called when the user ID of the owner of a participating Room is retrieved.
|
pure virtual |
Get the callback event called when the user IDs of the members participating in the Room are retrieved.
|
pure virtual |
Get the callback event called to get the number of members in a Room.
|
pure virtual |
Get the callback event called when additional information is registered for a participating Room.
|
pure virtual |
Gets the callback event called when the results of a FindRoomsByType are received.
|
pure virtual |
Get the callback event called when a response to Reserve is received.
|
pure virtual |
Get the callback event called when a response to CancelReservation is received.
|
pure virtual |
Get the callback event called when a response to a chat transmission is received.
|
pure virtual |
Get the callback event called when chat is received.
|
pure virtual |
Get the callback event called when a response to GetChatLog is received.
|
pure virtual |
Get the callback event called when StartP2PSync push notification is received.
|
pure virtual |
Get the callback event called when the Room owner is changed.
|
pure virtual |
Get the callback event called when a UpdateObject push is received.
|
pure virtual |
Get the callback event called when a UpdateObject response is received.
|
pure virtual |
Get the callback event called when received a message by Relay.
|
pure virtual |
Get the callback event called when received a message by RelayTo.
|
pure virtual |
Get the callback event called when the server is ready to shutdown.
|
pure virtual |
Create a new Room.
A callback event registered with GetCreateEvent() will be triggered.
[in] | maxMembers | Maximum number of clients that can join the Room to be created. |
[in] | allowEmpty | Determines if the Room will be held even if none of the clients have joined. |
[in] | join | Determines if the Room will be joined after it is created. true = join the Room after creating it. No Join response is sent from the server. false = only creates the Room. If you want to join the Room, you must perform a separate Join. |
[in] | ttl | Specifies the duration of the Room in seconds after it is empty. Used only when true is specified for allowEmpty. |
[in] | interval | Specifies the interval in milliseconds at which the server processes Broadcast messages, etc. If the value of interval is large, the server load will be reduced, but there will be a delay in receiving messages. If the value of If the value of interval is small, the server load will increase, but the message will be sent immediately from the server. The default value is 200 ms. |
|
pure virtual |
Join a Room.
Callback event registered with GetJoinEvent() will be triggered.
Callback event registered with GetMemberJoinEvent() will be triggered on the member of the Room. The user ID specified by uid can be received from the callback event.
[in] | roomID | Room ID of the Room to join |
[in] | message | Message sent to members when they join |
[in] | messageSize | Length of the message |
|
pure virtual |
Same as Join()
|
pure virtual |
Join the Room if available, otherwise create a new Room.
When a new Room is created, the callback event registered with GetCreateEvent() and
callback event registered with GetJoinEvent() will be triggered.
Only callback events registered with GetJoinEvent() will be triggered when joining an existing Room.
[in] | maxMembers | Maximum number of clients that can join the Room to be created. |
[in] | ttl | Duration in seconds after the Room is empty, used only when allowEmpty is set to true. |
[in] | message | Message sent to members when they join |
[in] | messageSize | Length of the message |
[in] | interval | Specifies the interval in milliseconds at which the server processes messages. Messages are sent together at the server for the interval time. If the value of interval is large, the server load will be reduced, but there will be a delay in receiving messages. If the value of interval is small, the server load will increase, but the message will be sent immediately from the server. The default value is 200 ms. |
[in] | allowEmpty | Determines whether or not the client will keep the Room even when no one is joining. |
|
pure virtual |
Same as JoinRandom()
|
pure virtual |
Leaving a Room.
Callback event registered with GetLeaveEvent() will be triggered.
If the exit is successful, a callback event registered with GetMemberLeaveEvent() will be triggered on each member of the Room.
[in] | roomID | Room ID of the Room |
[in] | message | Message sent to members when left from the Room |
[in] | messageSize | Length of the message |
|
pure virtual |
Same as Leave()
|
pure virtual |
Sends a message to all Room members including yourself.
Triggers a callback event registered with GetMemberBroadcastEvent().
[in] | roomID | Room ID of the Room |
[in] | message | Message to be sent |
[in] | messageSize | Length of the message |
[in] | reliable | Determines if the message is sent via reliable communication (RUDP); ignored for TCP protocol. |
|
pure virtual |
Same as BroadcastTo()
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Sends a message to a specific member who has joined a Room.
A callback event registered with GetMemberMessageEvent() will be triggered.
[in] | roomID | Room ID of the Room |
[in] | memberIDs | List of user IDs of members to send |
[in] | memberIDsCount | Number of member IDs |
[in] | message | Message to be sent |
[in] | messageSize | Length of the message |
[in] | reliable | Determines if the message is sent via reliable communication (RUDP); ignored for TCP protocol. |
|
pure virtual |
Same as MessageTo()
|
pure virtual |
Sends a message to Room members other than yourself.
Unlike Broadcast, messages are not compiled by the server.
A callback event registered with GetRelayEvent() will be triggered.
[in] | message | Message to be sent |
[in] | messageSize | Length of the message |
[in] | reliable | Determines if the message is sent via reliable communication (RUDP); ignored for TCP protocol. |
|
pure virtual |
Same as Relay()
|
pure virtual |
Sends a message to a specific member participating in a Room.
Unlike MessageTo, messages are not compiled by the server.
A callback event registered with GetRelayToEvent() will be triggered.
[in] | roomID | Room ID of the Room |
[in] | memberIDs | List of user IDs of members to be sent. |
[in] | memberIDsCount | Number of member IDs |
[in] | message | Message to be sent |
[in] | messageSize | Length of the message |
[in] | reliable | Determines if the message is sent via reliable communication (RUDP); ignored for TCP protocol. |
|
pure virtual |
Same as RelayTo()
|
pure virtual |
Set Room properties.
After calling this function, the callback event registered with GetUpdatePropertiesEvent() (e.g. OnRoomUpdateProperties) is called by the server in response.
[in] | roomID | Room ID of the Room |
[in] | properties | Specify properties and data to be registered. |
[in] | sync | If true, updated properties are synchronized with callback events registered with GetUpdatePropertiesEvent(). |
|
pure virtual |
Same as UpdateProperties()
|
pure virtual |
Get Room properties.
The callback event registered with GetGetPropertiesEvent() will be triggered.
[in] | roomID | Room ID of the Room |
[in] | propertyNames | Specify the name of the property to be acquired. |
[in] | propertyCount | Number of property name |
|
pure virtual |
Same as GetProperties()
|
pure virtual |
Increases or decreases the value of the specified Room property.
Callback events registered with GetIncrementPropertyEvent() (e.g. OnRoomIncrementProperty) will be triggered.
[in] | propertyName | Name of the property to be increased or decreased. |
[in] | delta | Size of the value to be increased or decreased |
[in] | sync | Determines if other clients will be notified. If true, callback events registered with GetIncrementPropertySyncEvent() will be triggered. |
|
pure virtual |
Same as IncrementProperty()
|
pure virtual |
Get the Room owner's user ID.
The callback event registered with GetOwnerIDEvent() will be triggered.
|
pure virtual |
Get a list of user IDs of members participating in a Room.
Callback events registered with GetMemberIDSEvent() will be triggered.
|
pure virtual |
Get the number of members in the Room.
The callback event registered with GetNumberOfMembersEvent() will be triggered.
[in] | roomID | Room ID of the Room |
|
pure virtual |
Same as GetNumberOfMembers()
|
pure virtual |
Migrate the Room to another server.
Only the Room owner can call it.
Upon successful execution, a notification is sent from the server to each member of the Room and the callback event registered with GetMigrateEvent() (e.g. OnRoomMigrate) is triggered.
The library internally leaves from the currently joined Room and joins a new Room to the server.
|
pure virtual |
Leaves the Room that the client is currently in and joins a new Room. Raises OnLeave and OnJoin and remotely raises OnMemberLeave and OnMemberJoin. You may callback use the callback instead of listening to the regular events. callback An optional callback to be invoked when successfully joined a new Room or failed to leave or join.
[in] | roomID_ | A Room ID to join |
[in] | leaveMessage | A byte array message to be broadcasted on leave. |
[in] | joinMessage | A byte array message to be broadcasted on join. |
|
pure virtual |
Register information to be added to Room.
[in] | roomType | Room type to be used by FindRoomsByType. |
[in] | roomName | A name of the Room registered. |
[in] | roomMetadata | Extra string data for the Room registered. |
|
pure virtual |
Same as Register()
|
pure virtual |
Searches for rooms of the same type.
Callback events registered with GetFindByTypeEvnet() will be triggered.
In the callback event, you can receive a list of rooms as a result of the search.
[in] | roomType | Type of Room to search |
[in] | limit | Maximum number of rooms in the list of search results |
|
pure virtual |
Reserves a member to join a Room.
A callback event registered with GetReserveEvent() will be triggered.
[in] | userIDs | List of user IDs of members to reserve. |
[in] | userIDsSize | Number of user IDs |
|
pure virtual |
Same as Reserve()
|
pure virtual |
Cancels a Room reservation.
The callback event registered with GetCancelReservationEvent() will be triggered.
[in] | cancelRoomID | Room ID of the Room to be canceled |
[in] | userIDs | List of user IDs of members to cancel |
[in] | userIDsSize | Number of user IDs |
|
pure virtual |
Same as CancelReservation()
|
pure virtual |
Cancel a reservation for a Room you are currently in.
The callback event registered with GetCancelReservationEvent() will be triggered.
[in] | userIDs | List of user IDs of members to cancel |
|
pure virtual |
Sends a chat message to the Room members.
Messages are stored on the server and past messages can be retrieved with GetChatLog().
The client executing this function will trigger a callback event registered with GetChatSyncResponseEvent().
members will trigger callback events registered with GetChatSyncEvent().
[in] | message | Message to be sent |
|
pure virtual |
Same as SendChatMessage()
|
pure virtual |
Retrieve past chat messages.
Callback events registered with GetChatLogEvent() will be triggered.
|
pure virtual |
Starts P2P communication with the members participating in the Room.
Triggers a callback event registered with GetStartP2PSyncEvent().
Receive a list of peer addresses in the callback event.
This function must be executed by only one of the Room members.
[in] | linkedClients | Specifies the number of clients to establish a P2P connection. 0 = Receive addresses of all matched members. n = Receive addresses of n randomly selected members from among the matched members. |
|
pure virtual |
Updates the Room object.
Successful execution triggers a callback event registered with GetObjectUpdateEvent().
Notification is sent to all members of the Room, including yourself.
[in] | mode | Mode to operate the object. |
[in] | name | Name of the object |
[in] | obj | Specifies an object by a list of keys and values. e.g. obj["x"] = 123.4; e.g. obj["y"] = 567.8; e.g. obj["hp"] = 300.0; If mode is OBJ_DEL_MODE, this parameter is not used because the target object is deleted. |
[in] | reliable | Determines whether to send via reliable communication (RUDP); ignored for TCP protocol. |
|
pure virtual |
Get the Room ID of the Room you are participating in.
|
pure virtual |
Set the Room ID of the Room.
|
pure virtual |
Same as SetRoomID()
|
pure virtual |
Register custom message functions.