Diarkis C# Client SDK
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | Events | List of all members
Diarkis.Modules.MatchMaker Class Reference

MatchMaker client interface that uses either UDP or TCP Diarkis client for communication. MatchMaker class handles plethora of matchmaking features including Team formaing matchmaking and P2P matchmaking. More...

Inheritance diagram for Diarkis.Modules.MatchMaker:
Diarkis.Modules.WsMatchMaker

Classes

class  ResultItem
 Matchmaking search result item. More...
 

Public Member Functions

delegate void ResponseRoomIDHandler (bool success, string roomID, byte[] payload)
 
delegate void ResponseHandler (bool success, byte[] message)
 
delegate void JoinResponseHandler (bool success, string[] memberIDs, byte[] payload)
 
delegate void SyncHandler (byte[] message)
 
delegate void ResultsHandler (bool success, ResultItem[] results, byte[] payload)
 
delegate void P2PHandler (Packet.P2PClientAddr[] clients)
 
delegate void IDSyncHandler (string id)
 
delegate void NotificationHandler ()
 Handles server push without data. More...
 
bool SetupAsTcp (Tcp tcp)
 MatchMaker class must have an instance of Diarkis TCP class if the client choses to use TCP. More...
 
bool SetupAsUdp (Udp udp)
 MatchMaker class must have an instance of Diarkis UDP class if the client choses to use UDP. More...
 
bool IsTeamMatchmaking ()
 Returns true if the current matchmaking is a team matchmaking. More...
 
virtual void IssueTicket ()
 Sends a request issue a matchmaking ticket on the server. All matchmaking conditions and logic will be controlled on the server and the client will only be waiting for OnTicketComplete event to be raised. If the issued ticket fails to create a match, the event will be raised only on the client that issued the ticket. If the issued ticket successfully creates a match, the event will be raised on all the clients that have been matched. More...
 
virtual void CancelTicket ()
 Cancels an issued ticket. More...
 
virtual bool HostMatchmaking ()
 Registers itself to MatchMaker's matchmaking and wait until matches are made. You may abort matchmaking by calling ClearMatchmaking. You will become the host of this matchmaking. OnHostMatchmakingResponse will be raised as a server response. More...
 
virtual bool HostTeamMatchmaking ()
 
virtual void ClearMatchmaking ()
 Clears the current matchmaking without discarding the matchmaking. The matched and joined user clients remain in the matchmaking. This will raise OnAbortMatchmakingResponse as a server response. More...
 
virtual void DisbandMatchmaking (byte[] message)
 Completely distroys the current matchmaking and kicks out the matched and joined user clients. OnDisbandMatchmaking will be raised on all matched clients. More...
 
virtual void Kick (string userID)
 Specify a matched user by its ID to forcefully kick out of the matchmaking. Only the host of the matchmaking may execute this operation. OnKick event is raised on all matched user clients including the kicked out user client. More...
 
virtual void ClaimReservedMatchmaking (byte[] message)
 When you set ReserveOnlyto initiate HostMatchmaking, you must "join" the matchmaking room to be part of the matchmaking. Successful attempt raises OnMemberJoin event on all matched remote clients. OnJoinResponse event as a server response. More...
 
virtual void JoinMatchmakingFromResult (ResultItem result, byte[] message)
 Attempts to join a matched matchmaking from a search result. Successful attempt raises OnMemberJoin event on all matched remote clients. OnJoinResponse event as a server response. More...
 
virtual void LeaveMatchmaking (byte[] message)
 Leaves the matchmaking and sends a message to the other members. OnMemberLeave event will be raised. OnLeaveResponse event will be raised as a server response. More...
 
virtual void Sync (byte[] message)
 Sends a synchronize message to all matched clients. This will raise OnMemberSync event including the sender client. More...
 
virtual void NotifyMatchmakingCompletion ()
 Sends a notification to all matched clients to let them know that matchmaking has completed. This will also remove the matchmaking from searches. All matched clients will raise OnComplete event including the sender client. Only the client that started the matchmaking is allowed to use this function. More...
 
virtual void P2PAddressSync (byte linkedClientNum=0)
 Instructs the server to send the list of all matched client's addresses for P2P. Successful call of this method wil raise OnP2PAddressSync event on all matched clients. More...
 
virtual void Search (List< string > profileIDs, string tag, Dictionary< string, uint > props, bool joinFlag, ushort howmany, byte[] message)
 Actively search for matchmaking using multiple matchmaking profile IDs. More...
 
virtual void TeamSearch (List< string > profileIDs, string tag, Dictionary< string, uint > props, bool joinFlag, ushort howmany, byte[] message)
 Actively search for team matchmaking using multiple matchmaking profile IDs. More...
 
virtual void Commit ()
 Commit instructs all the team members from the matchmaking to join the team matchmaking. When you commit, the previous matchmaking that formed the team will be discarded. All team member clients will raise OnCompleteCommit evevnt. Commited member clients will be able to receive synchonizing messages. This is only usable when team matchmaking is used. More...
 
virtual bool StartBackfill (string roomID)
 Registers the room of the Room ID passed to be backfilled via MatchMaker. More...
 

Static Public Attributes

const uint NEW_TEAM_CMD = 209
 Built in command to create a new team with the clients currently matched. More...
 
const uint TEAM_SEARCH_CMD = 214
 Built in command to search for other team matchmakings to join. More...
 
const uint COMMIT_CMD = 215
 
const uint COMP_COMMIT_CMD = 216
 Built in command to complete commit by moving from the previous matchmaking to the new team matchmaking. More...
 

Protected Member Functions

void setupOnReconnEvent (uint ver, uint cmd, JoinResponseHandler callback)
 
void ClearMatchmaking_ (bool halt, byte[] abortMessage)
 
byte[] PackForAdd_ (string uid, byte[] metadata)
 
byte[] PackForSearch_ (List< string > profileIDs, string tag, Dictionary< string, uint > props, bool joinFlag, ushort howmany, byte[] message)
 
void Clear_ (uint cmd, string uid, bool halt, byte[] abortMessage)
 
void Send_ (uint cmd, byte[] pkt)
 
void DispatchEventFromBytesListPayload (byte[] payload, SyncHandler eventCallback)
 
void DispatchTicketCompleteSuccess_ (byte[] payload)
 
void DispatchHostChange_ (byte[] payload)
 

Protected Attributes

bool _team = false
 
string _roomID = ""
 
string _reservedRoomID = ""
 
string _teamRoomID = ""
 
string _mmID = ""
 
string _uid = ""
 
string _tag = ""
 
Dictionary< string, uint > _props = new Dictionary<string, uint>()
 
byte[] _metadata = new byte[0]
 
ushort _ttl = 60
 
ushort _maxMembers = 0
 
bool _reserveOnly = false
 
bool _waiting = false
 
Tcp _tcp
 
Udp _udp
 
string[] _memberIDs
 

Static Protected Attributes

const uint STATUS_OK = 1
 Server response status for success. More...
 
const uint BUILTIN_CMD_VER = 1
 Build in command version that is reserved for Diarkis core. More...
 
const uint WAIT_CMD = 200
 Built in command ID for wait and add. Used by HostMatchmaking method. More...
 
const uint SEARCH_CMD = 201
 Built in command ID for search. Used by Search method. More...
 
const uint REMOVE_CMD = 202
 Built in command ID for remove and abort. Used by ClearMatchmakingHost method. More...
 
const uint LEAVE_CMD = 203
 Built in command ID for leaving the matched matchmaking. More...
 
const uint SYNC_CMD = 204
 Built in command ID for synchronizing with other clients who matched. More...
 
const uint CLAIM_CMD = 205
 Built in command ID for claiming the reserved matchmaking. More...
 
const uint COMPLETE_CMD = 206
 Build in command ID for server push when matchmaking reaches is max members. More...
 
const uint RESULTS_CMD = 207
 Built in command ID for search response when join is set to false. More...
 
const uint P2P_CMD = 208
 Built in command to initiate P2P. This command will raise OnP2PAddressSyncevent with client public addresses for P2P. More...
 
const uint BACKFILL_CMD = 211
 Built in command to start backfill with a room. More...
 
const uint KICK_CMD = 217
 Command for the host to kickout a specific matched user. More...
 
const uint TICKET_CMD = 218
 Command to send a request to issue a matchmaking ticket. Once a matchmaking ticket is issued on the server, the client will wait for OnTicketComplete event to be raised. More...
 
const uint TICKET_ERR = 219
 Push event from server when the issued ticket errors out. The command ID is used for OnTicketComplete event. More...
 
const uint TICKET_COMP = 220
 Push event from server when the issued ticket completes successfully (finds matches). The command ID is used for OnTicketComplete event. More...
 
const uint HOST_CHANGE = 221
 Push event from the server when a host is changed. More...
 
const uint TICKET_CANCEL_CMD = 222
 Command to cancel issued ticket More...
 
const uint TICKET_MATCH = 223
 Internal push event to receive room ID from the server More...
 

Properties

string RoomID [get]
 Matchmaking room ID. If you have ReserveOnly flag true, you must use ClaimReserved to join the matchmaking room. Room ID can be passed to Room class instance to use as a game session room. More...
 
string TeamRoomID [get]
 Matchmaking room ID. If you have ReserveOnly flag true, you must use ClaimReserved to join the matchmaking room. Team room ID can be passed to Room class instance to use as a game session room. More...
 
string MatchmakingProfileID [get, set]
 Specifies which matchmaking profile to use for HostMatchmaking. This property is used by HostMatchmaking only. More...
 
string UID [get, set]
 Unique ID to be passed to matchmaking search results. This property is used by HostMatchmaking only. More...
 
Dictionary< string, uint > Properties [get, set]
 Matchmaking conditions. The properties must match the condition properties of Matchmaking profile specified by MatchmakingProfileID. More...
 
byte[] Metadata [get, set]
 Optional custom data to be passed to matchmaking search results. More...
 
ushort Time [get, set]
 TTL in seconds for the matchmaking to last if ReserveOnly is set to true. TTL will be disabled once the client uses ClaimReserved to claim the reserved matchmaking. This property is used by HostMatchmaking only. More...
 
ushort MaxMatchMembers [get, set]
 Maximum number of clients allowed to match for the matchmaking. This property is used by HostMatchmaking. When TeamMatchmaking is set to true, the value represents the number of teams rather than the number of indivisual user clients. The maximum number of indivisual user for team matchmaking is calculated as follows: MaxMatchMembers x Number of matched user clients of the host. More...
 
bool ReserveOnly [get, set]
 Creates a matchmaking, but reserve it for certain time without joining the matchmaking. This allows the client to create mutiple matchmakings at a time, but eventually the client must calim one of them by ClaimReserved. This property is used by HostMatchmaking only. More...
 
string Tag [get, set]
 Tag is used to isolate and group matchmaking users. It will narrow the matchmaking search to hosts with matching tag. More...
 

Events

virtual ResponseHandler OnKickResponse
 Raised as a server response when executing user kick. More...
 
virtual ResponseRoomIDHandler OnHostMatchmakingResponse
 Event raised by HostMatchmaking method as the server response. More...
 
virtual ResponseRoomIDHandler OnHostTeamMatchmakingResponse
 Event raised by HostTeamMatchmaking method as the server response. More...
 
virtual ResponseHandler OnAbortMatchmakingResponse
 Event raised by ClearMatchmakingHost method as the server response. More...
 
virtual SyncHandler OnDisbandMatchmaking
 Event raised when the client started the matchmaking room aborts the matchmaking. More...
 
virtual SyncHandler OnMemberLeave
 Event raised when other client matched leaves the matchmaking with a message. More...
 
virtual SyncHandler OnMemberJoin
 Evnt raised when another client matches and joins with a message. More...
 
virtual SyncHandler OnMemberSync
 Event raised when other client matched sends out synchronizing message. More...
 
virtual JoinResponseHandler OnJoinResponse
 Event raised as the server resonse when you claim the reserved matchmaking. More...
 
virtual ResponseHandler OnLeaveResponse
 Event raised as the server response when you leave the matchmaking. More...
 
virtual NotificationHandler OnComplete
 Event raised when the matchmaking reachs its max members. More...
 
virtual IDSyncHandler OnKick
 Raised when a matched user is kicked out of the matchmaking by the host. More...
 
virtual JoinResponseHandler OnSearchResponse
 Event raised when the matchmaking search on the server finishes. This event is raised only when join is set to true. More...
 
virtual JoinResponseHandler OnTeamSearchResponse
 Event raised when the team matchmaking search on the server finishes. This event is raised only when join is set to true. More...
 
virtual ResultsHandler OnResultsResponse
 Event raised when the matchmaking search on the server finishes and sends the results. This event is raised only when join is set to false. More...
 
virtual ResultsHandler OnTeamResultsResponse
 Event raised when the team matchmaking search on the server finishes and sends the results. This event is raised only when join is set to false. More...
 
virtual P2PHandler OnP2PAddressSync
 Event raised when P2P is initiated by the owner of the matchmaking via P2PAddressSync. More...
 
virtual ResponseHandler OnP2PAddressSyncResponse
 Event raised as a server response to P2PAddressSync. More...
 
virtual ResponseHandler OnBackfillStartResponse
 Event raised as a server responmse to Backfill. More...
 
virtual ResponseHandler OnCommitResponse
 Event raised as a server response to Commit. More...
 
virtual JoinResponseHandler OnCompleteCommit
 Event raised on the team member clients when Commit has been successfully executed. More...
 
virtual ResponseHandler OnTicketComplete
 Event raised when a ticket issed by IssueTicket finishes (success/failure). More...
 
virtual IDSyncHandler OnHostChange
 Event raised when a matchmaking host is changed. More...
 
virtual ResponseHandler OnCancelTicket
 Event raised when CancelTicket is invoked. More...
 

Detailed Description

MatchMaker client interface that uses either UDP or TCP Diarkis client for communication. MatchMaker class handles plethora of matchmaking features including Team formaing matchmaking and P2P matchmaking.

Member Function Documentation

◆ CancelTicket()

virtual void Diarkis.Modules.MatchMaker.CancelTicket ( )
inlinevirtual

Cancels an issued ticket.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ ClaimReservedMatchmaking()

virtual void Diarkis.Modules.MatchMaker.ClaimReservedMatchmaking ( byte[]  message)
inlinevirtual

When you set ReserveOnlyto initiate HostMatchmaking, you must "join" the matchmaking room to be part of the matchmaking. Successful attempt raises OnMemberJoin event on all matched remote clients. OnJoinResponse event as a server response.

Parameters
messageMessage byte array to be sent to the other members of the matchmaking

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ ClearMatchmaking()

virtual void Diarkis.Modules.MatchMaker.ClearMatchmaking ( )
inlinevirtual

Clears the current matchmaking without discarding the matchmaking. The matched and joined user clients remain in the matchmaking. This will raise OnAbortMatchmakingResponse as a server response.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ ClearMatchmaking_()

void Diarkis.Modules.MatchMaker.ClearMatchmaking_ ( bool  halt,
byte[]  abortMessage 
)
inlineprotected
Parameters
haltIf set to true, the matchmaking will be halted but not discarded. If matchmaking is only halted (halt = true), the matchmaking itself is still instact, but will not be searchable by others. In order to make the matchmaking "searchable" again, use StartBackfill.

◆ Commit()

virtual void Diarkis.Modules.MatchMaker.Commit ( )
inlinevirtual

Commit instructs all the team members from the matchmaking to join the team matchmaking. When you commit, the previous matchmaking that formed the team will be discarded. All team member clients will raise OnCompleteCommit evevnt. Commited member clients will be able to receive synchonizing messages. This is only usable when team matchmaking is used.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ DisbandMatchmaking()

virtual void Diarkis.Modules.MatchMaker.DisbandMatchmaking ( byte[]  message)
inlinevirtual

Completely distroys the current matchmaking and kicks out the matched and joined user clients. OnDisbandMatchmaking will be raised on all matched clients.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ HostMatchmaking()

virtual bool Diarkis.Modules.MatchMaker.HostMatchmaking ( )
inlinevirtual

Registers itself to MatchMaker's matchmaking and wait until matches are made. You may abort matchmaking by calling ClearMatchmaking. You will become the host of this matchmaking. OnHostMatchmakingResponse will be raised as a server response.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ IDSyncHandler()

delegate void Diarkis.Modules.MatchMaker.IDSyncHandler ( string  id)
Parameters
idID to synchronize.

◆ IssueTicket()

virtual void Diarkis.Modules.MatchMaker.IssueTicket ( )
inlinevirtual

Sends a request issue a matchmaking ticket on the server. All matchmaking conditions and logic will be controlled on the server and the client will only be waiting for OnTicketComplete event to be raised. If the issued ticket fails to create a match, the event will be raised only on the client that issued the ticket. If the issued ticket successfully creates a match, the event will be raised on all the clients that have been matched.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ IsTeamMatchmaking()

bool Diarkis.Modules.MatchMaker.IsTeamMatchmaking ( )
inline

Returns true if the current matchmaking is a team matchmaking.

◆ JoinMatchmakingFromResult()

virtual void Diarkis.Modules.MatchMaker.JoinMatchmakingFromResult ( ResultItem  result,
byte[]  message 
)
inlinevirtual

Attempts to join a matched matchmaking from a search result. Successful attempt raises OnMemberJoin event on all matched remote clients. OnJoinResponse event as a server response.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ JoinResponseHandler()

delegate void Diarkis.Modules.MatchMaker.JoinResponseHandler ( bool  success,
string[]  memberIDs,
byte[]  payload 
)
Parameters
memberIDsA list of already matched and joined client IDs.

◆ Kick()

virtual void Diarkis.Modules.MatchMaker.Kick ( string  userID)
inlinevirtual

Specify a matched user by its ID to forcefully kick out of the matchmaking. Only the host of the matchmaking may execute this operation. OnKick event is raised on all matched user clients including the kicked out user client.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ LeaveMatchmaking()

virtual void Diarkis.Modules.MatchMaker.LeaveMatchmaking ( byte[]  message)
inlinevirtual

Leaves the matchmaking and sends a message to the other members. OnMemberLeave event will be raised. OnLeaveResponse event will be raised as a server response.

Parameters
messageMessage byte array to be sent to the other members of the matchmaking.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ NotificationHandler()

delegate void Diarkis.Modules.MatchMaker.NotificationHandler ( )

Handles server push without data.

◆ NotifyMatchmakingCompletion()

virtual void Diarkis.Modules.MatchMaker.NotifyMatchmakingCompletion ( )
inlinevirtual

Sends a notification to all matched clients to let them know that matchmaking has completed. This will also remove the matchmaking from searches. All matched clients will raise OnComplete event including the sender client. Only the client that started the matchmaking is allowed to use this function.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ P2PAddressSync()

virtual void Diarkis.Modules.MatchMaker.P2PAddressSync ( byte  linkedClientNum = 0)
inlinevirtual

Instructs the server to send the list of all matched client's addresses for P2P. Successful call of this method wil raise OnP2PAddressSync event on all matched clients.

Parameters
linkedClientNumNumber of clients that should be linked directly via peer-to-peer. If linkedClientNum is set to 0, all matched members will be directly linked.

◆ P2PHandler()

delegate void Diarkis.Modules.MatchMaker.P2PHandler ( Packet.P2PClientAddr[]  clients)
Parameters
addressesList of client public addresses for P2P.

◆ ResponseHandler()

delegate void Diarkis.Modules.MatchMaker.ResponseHandler ( bool  success,
byte[]  message 
)
Parameters
messageIf success is true, this byte array contains "OK" as a string. If success is false, this contains the error data.

◆ ResponseRoomIDHandler()

delegate void Diarkis.Modules.MatchMaker.ResponseRoomIDHandler ( bool  success,
string  roomID,
byte[]  payload 
)
Parameters
payloadRaw data of the server response. If success is false, this will be the error data.

◆ ResultsHandler()

delegate void Diarkis.Modules.MatchMaker.ResultsHandler ( bool  success,
ResultItem[]  results,
byte[]  payload 
)
Parameters
resultsA list of matched item unique IDs as results.

◆ Search()

virtual void Diarkis.Modules.MatchMaker.Search ( List< string >  profileIDs,
string  tag,
Dictionary< string, uint >  props,
bool  joinFlag,
ushort  howmany,
byte[]  message 
)
inlinevirtual

Actively search for matchmaking using multiple matchmaking profile IDs.

Parameters
profileIDsSearch allows you to search for a match using multiple matchmaking profiles. The order of the server is determined by the order of the ID list. You may, for example, search with very strict matchmaking profile and move to more relaxed ones etc.
tagSearch will target hosts only with matching tag.
propsSearch condition properties.
joinFlagIf set to false, search will send a list of matched result back to the client with OnResultsResponse event. If set to true, the client will automatically joins the matched matchmaking room and OnSearchResponse event will be raised.
homanyDetermine maximum how many matched results to expect by the search results.
messageMessage byte array to be sent to the other matched users.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ SetupAsTcp()

bool Diarkis.Modules.MatchMaker.SetupAsTcp ( Tcp  tcp)
inline

MatchMaker class must have an instance of Diarkis TCP class if the client choses to use TCP.

◆ SetupAsUdp()

bool Diarkis.Modules.MatchMaker.SetupAsUdp ( Udp  udp)
inline

MatchMaker class must have an instance of Diarkis UDP class if the client choses to use UDP.

◆ StartBackfill()

virtual bool Diarkis.Modules.MatchMaker.StartBackfill ( string  roomID)
inlinevirtual

Registers the room of the Room ID passed to be backfilled via MatchMaker.

while the original members of the room are already in a game session etc. This should be used when you are using Diarkis Room as your in-game session where clients participate in the game play. Using backfill other remote clients may join the game session room directly via MatchMaker. OnMemberJoin will be raised as a new remote client joins. You may abort backfill by calling ClearMatchmaking.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ Sync()

virtual void Diarkis.Modules.MatchMaker.Sync ( byte[]  message)
inlinevirtual

Sends a synchronize message to all matched clients. This will raise OnMemberSync event including the sender client.

Parameters
messageMessage byte array to be sent as a synchronize message to the other matched clients.

Reimplemented in Diarkis.Modules.WsMatchMaker.

◆ SyncHandler()

delegate void Diarkis.Modules.MatchMaker.SyncHandler ( byte[]  message)
Parameters
messageMessage received when the client started the matchmaking room aborts after you make a match and joins the room.

◆ TeamSearch()

virtual void Diarkis.Modules.MatchMaker.TeamSearch ( List< string >  profileIDs,
string  tag,
Dictionary< string, uint >  props,
bool  joinFlag,
ushort  howmany,
byte[]  message 
)
inlinevirtual

Actively search for team matchmaking using multiple matchmaking profile IDs.

Parameters
profileIDsSearch allows you to search for a match using multiple matchmaking profiles. The order of the server is determined by the order of the ID list. You may, for example, search with very strict matchmaking profile and move to more relaxed ones etc.
tagSearch will target hosts only with matching tag.
propsSearch condition properties.
joinFlagIf set to false, search will send a list of matched result back to the client with OnResultsResponse event. If set to true, the client will automatically joins the matched matchmaking room and OnSearchResponse event will be raised.
homanyDetermine maximum how many matched results to expect by the search results.
messageMessage byte array to be sent to the other matched users.

Reimplemented in Diarkis.Modules.WsMatchMaker.

Member Data Documentation

◆ BACKFILL_CMD

const uint Diarkis.Modules.MatchMaker.BACKFILL_CMD = 211
staticprotected

Built in command to start backfill with a room.

◆ BUILTIN_CMD_VER

const uint Diarkis.Modules.MatchMaker.BUILTIN_CMD_VER = 1
staticprotected

Build in command version that is reserved for Diarkis core.

◆ CLAIM_CMD

const uint Diarkis.Modules.MatchMaker.CLAIM_CMD = 205
staticprotected

Built in command ID for claiming the reserved matchmaking.

◆ COMMIT_CMD

const uint Diarkis.Modules.MatchMaker.COMMIT_CMD = 215
static

Built in command to have all team members commit to the new team matchmaking. When you commit to the new team matchmaking, the previous matchmaking will be discarded.

◆ COMP_COMMIT_CMD

const uint Diarkis.Modules.MatchMaker.COMP_COMMIT_CMD = 216
static

Built in command to complete commit by moving from the previous matchmaking to the new team matchmaking.

◆ COMPLETE_CMD

const uint Diarkis.Modules.MatchMaker.COMPLETE_CMD = 206
staticprotected

Build in command ID for server push when matchmaking reaches is max members.

◆ HOST_CHANGE

const uint Diarkis.Modules.MatchMaker.HOST_CHANGE = 221
staticprotected

Push event from the server when a host is changed.

◆ KICK_CMD

const uint Diarkis.Modules.MatchMaker.KICK_CMD = 217
staticprotected

Command for the host to kickout a specific matched user.

◆ LEAVE_CMD

const uint Diarkis.Modules.MatchMaker.LEAVE_CMD = 203
staticprotected

Built in command ID for leaving the matched matchmaking.

◆ NEW_TEAM_CMD

const uint Diarkis.Modules.MatchMaker.NEW_TEAM_CMD = 209
static

Built in command to create a new team with the clients currently matched.

◆ P2P_CMD

const uint Diarkis.Modules.MatchMaker.P2P_CMD = 208
staticprotected

Built in command to initiate P2P. This command will raise OnP2PAddressSyncevent with client public addresses for P2P.

◆ REMOVE_CMD

const uint Diarkis.Modules.MatchMaker.REMOVE_CMD = 202
staticprotected

Built in command ID for remove and abort. Used by ClearMatchmakingHost method.

◆ RESULTS_CMD

const uint Diarkis.Modules.MatchMaker.RESULTS_CMD = 207
staticprotected

Built in command ID for search response when join is set to false.

◆ SEARCH_CMD

const uint Diarkis.Modules.MatchMaker.SEARCH_CMD = 201
staticprotected

Built in command ID for search. Used by Search method.

◆ STATUS_OK

const uint Diarkis.Modules.MatchMaker.STATUS_OK = 1
staticprotected

Server response status for success.

◆ SYNC_CMD

const uint Diarkis.Modules.MatchMaker.SYNC_CMD = 204
staticprotected

Built in command ID for synchronizing with other clients who matched.

◆ TEAM_SEARCH_CMD

const uint Diarkis.Modules.MatchMaker.TEAM_SEARCH_CMD = 214
static

Built in command to search for other team matchmakings to join.

◆ TICKET_CANCEL_CMD

const uint Diarkis.Modules.MatchMaker.TICKET_CANCEL_CMD = 222
staticprotected

Command to cancel issued ticket

◆ TICKET_CMD

const uint Diarkis.Modules.MatchMaker.TICKET_CMD = 218
staticprotected

Command to send a request to issue a matchmaking ticket. Once a matchmaking ticket is issued on the server, the client will wait for OnTicketComplete event to be raised.

◆ TICKET_COMP

const uint Diarkis.Modules.MatchMaker.TICKET_COMP = 220
staticprotected

Push event from server when the issued ticket completes successfully (finds matches). The command ID is used for OnTicketComplete event.

◆ TICKET_ERR

const uint Diarkis.Modules.MatchMaker.TICKET_ERR = 219
staticprotected

Push event from server when the issued ticket errors out. The command ID is used for OnTicketComplete event.

◆ TICKET_MATCH

const uint Diarkis.Modules.MatchMaker.TICKET_MATCH = 223
staticprotected

Internal push event to receive room ID from the server

◆ WAIT_CMD

const uint Diarkis.Modules.MatchMaker.WAIT_CMD = 200
staticprotected

Built in command ID for wait and add. Used by HostMatchmaking method.

Property Documentation

◆ MatchmakingProfileID

string Diarkis.Modules.MatchMaker.MatchmakingProfileID
getset

Specifies which matchmaking profile to use for HostMatchmaking. This property is used by HostMatchmaking only.

◆ MaxMatchMembers

ushort Diarkis.Modules.MatchMaker.MaxMatchMembers
getset

Maximum number of clients allowed to match for the matchmaking. This property is used by HostMatchmaking. When TeamMatchmaking is set to true, the value represents the number of teams rather than the number of indivisual user clients. The maximum number of indivisual user for team matchmaking is calculated as follows: MaxMatchMembers x Number of matched user clients of the host.

◆ Metadata

byte [] Diarkis.Modules.MatchMaker.Metadata
getset

Optional custom data to be passed to matchmaking search results.

◆ Properties

Dictionary<string, uint> Diarkis.Modules.MatchMaker.Properties
getset

Matchmaking conditions. The properties must match the condition properties of Matchmaking profile specified by MatchmakingProfileID.

◆ ReserveOnly

bool Diarkis.Modules.MatchMaker.ReserveOnly
getset

Creates a matchmaking, but reserve it for certain time without joining the matchmaking. This allows the client to create mutiple matchmakings at a time, but eventually the client must calim one of them by ClaimReserved. This property is used by HostMatchmaking only.

◆ RoomID

string Diarkis.Modules.MatchMaker.RoomID
get

Matchmaking room ID. If you have ReserveOnly flag true, you must use ClaimReserved to join the matchmaking room. Room ID can be passed to Room class instance to use as a game session room.

◆ Tag

string Diarkis.Modules.MatchMaker.Tag
getset

Tag is used to isolate and group matchmaking users. It will narrow the matchmaking search to hosts with matching tag.

◆ TeamRoomID

string Diarkis.Modules.MatchMaker.TeamRoomID
get

Matchmaking room ID. If you have ReserveOnly flag true, you must use ClaimReserved to join the matchmaking room. Team room ID can be passed to Room class instance to use as a game session room.

◆ Time

ushort Diarkis.Modules.MatchMaker.Time
getset

TTL in seconds for the matchmaking to last if ReserveOnly is set to true. TTL will be disabled once the client uses ClaimReserved to claim the reserved matchmaking. This property is used by HostMatchmaking only.

◆ UID

string Diarkis.Modules.MatchMaker.UID
getset

Unique ID to be passed to matchmaking search results. This property is used by HostMatchmaking only.

Event Documentation

◆ OnAbortMatchmakingResponse

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnAbortMatchmakingResponse

Event raised by ClearMatchmakingHost method as the server response.

◆ OnBackfillStartResponse

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnBackfillStartResponse

Event raised as a server responmse to Backfill.

◆ OnCancelTicket

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnCancelTicket

Event raised when CancelTicket is invoked.

◆ OnCommitResponse

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnCommitResponse

Event raised as a server response to Commit.

◆ OnComplete

virtual NotificationHandler Diarkis.Modules.MatchMaker.OnComplete

Event raised when the matchmaking reachs its max members.

◆ OnCompleteCommit

virtual JoinResponseHandler Diarkis.Modules.MatchMaker.OnCompleteCommit

Event raised on the team member clients when Commit has been successfully executed.

◆ OnDisbandMatchmaking

virtual SyncHandler Diarkis.Modules.MatchMaker.OnDisbandMatchmaking

Event raised when the client started the matchmaking room aborts the matchmaking.

◆ OnHostChange

virtual IDSyncHandler Diarkis.Modules.MatchMaker.OnHostChange

Event raised when a matchmaking host is changed.

◆ OnHostMatchmakingResponse

virtual ResponseRoomIDHandler Diarkis.Modules.MatchMaker.OnHostMatchmakingResponse

Event raised by HostMatchmaking method as the server response.

◆ OnHostTeamMatchmakingResponse

virtual ResponseRoomIDHandler Diarkis.Modules.MatchMaker.OnHostTeamMatchmakingResponse

Event raised by HostTeamMatchmaking method as the server response.

◆ OnJoinResponse

virtual JoinResponseHandler Diarkis.Modules.MatchMaker.OnJoinResponse

Event raised as the server resonse when you claim the reserved matchmaking.

◆ OnKick

virtual IDSyncHandler Diarkis.Modules.MatchMaker.OnKick

Raised when a matched user is kicked out of the matchmaking by the host.

◆ OnKickResponse

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnKickResponse

Raised as a server response when executing user kick.

◆ OnLeaveResponse

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnLeaveResponse

Event raised as the server response when you leave the matchmaking.

◆ OnMemberJoin

virtual SyncHandler Diarkis.Modules.MatchMaker.OnMemberJoin

Evnt raised when another client matches and joins with a message.

◆ OnMemberLeave

virtual SyncHandler Diarkis.Modules.MatchMaker.OnMemberLeave

Event raised when other client matched leaves the matchmaking with a message.

◆ OnMemberSync

virtual SyncHandler Diarkis.Modules.MatchMaker.OnMemberSync

Event raised when other client matched sends out synchronizing message.

◆ OnP2PAddressSync

virtual P2PHandler Diarkis.Modules.MatchMaker.OnP2PAddressSync

Event raised when P2P is initiated by the owner of the matchmaking via P2PAddressSync.

◆ OnP2PAddressSyncResponse

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnP2PAddressSyncResponse

Event raised as a server response to P2PAddressSync.

◆ OnResultsResponse

virtual ResultsHandler Diarkis.Modules.MatchMaker.OnResultsResponse

Event raised when the matchmaking search on the server finishes and sends the results. This event is raised only when join is set to false.

◆ OnSearchResponse

virtual JoinResponseHandler Diarkis.Modules.MatchMaker.OnSearchResponse

Event raised when the matchmaking search on the server finishes. This event is raised only when join is set to true.

◆ OnTeamResultsResponse

virtual ResultsHandler Diarkis.Modules.MatchMaker.OnTeamResultsResponse

Event raised when the team matchmaking search on the server finishes and sends the results. This event is raised only when join is set to false.

◆ OnTeamSearchResponse

virtual JoinResponseHandler Diarkis.Modules.MatchMaker.OnTeamSearchResponse

Event raised when the team matchmaking search on the server finishes. This event is raised only when join is set to true.

◆ OnTicketComplete

virtual ResponseHandler Diarkis.Modules.MatchMaker.OnTicketComplete

Event raised when a ticket issed by IssueTicket finishes (success/failure).


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