Diarkis.Modules.MatchMaker mm =newDiarkis.Modules.MatchMaker();// Specify which matchmaking profile to use for your matchmakingmm.MatchmakingProfileID="RankMatch";// Define how many user clients allowed to join your matchmakingmm.MaxMatchMembers=8;// Unique ID to identify your matchmaking i.e. your user ID etc.mm.UID="Set some unique ID to identify your matchmaking";// Matchmaking condition propertiesDictionary<string,int> properties =newDictionary<string,int>();properties.Add("rank",10);mm.Properties= properties;// Set this to true, if you wish to start multiple matchmakings without joining yourselfmm.ReverseOnly=false;// Start hosting your matchmakingmm.HostMatchmaking();
// Server response for HostMatchmaking// that tells you if becoming a host has failed or notmm.OnHostResponse+= (bool success,string matchmakingRoomID,byte[] response) =>{};
mm.OnP2PAddressSync+= (string[] addressList) => { // The list of all matched and joined user clients' client addresses. // The format of the address string is "0.0.0.0:8888".};