internal Coroutine SetMatchAttributes(SetMatchAttributesRequest req, NetworkMatch.BasicResponseDelegate callback) { Coroutine result; if (callback == null) { UnityEngine.Debug.Log("callback supplied is null, aborting SetMatchAttributes Request."); result = null; } else { Uri uri = new Uri(this.baseUri, "/json/reply/SetMatchAttributesRequest"); UnityEngine.Debug.Log("MatchMakingClient SetMatchAttributes :" + uri); WWWForm wWWForm = new WWWForm(); wWWForm.AddField("version", Request.currentVersion); wWWForm.AddField("projectId", Application.cloudProjectId); wWWForm.AddField("sourceId", Utility.GetSourceID().ToString()); wWWForm.AddField("accessTokenString", Utility.GetAccessTokenForNetwork(req.networkId).GetByteString()); wWWForm.AddField("domain", req.domain); wWWForm.AddField("networkId", req.networkId.ToString()); wWWForm.AddField("isListed", req.isListed.ToString()); wWWForm.headers["Accept"] = "application/json"; WWW client = new WWW(uri.ToString(), wWWForm); result = base.StartCoroutine(this.ProcessMatchResponse <BasicResponse, NetworkMatch.BasicResponseDelegate>(client, new NetworkMatch.InternalResponseDelegate <BasicResponse, NetworkMatch.BasicResponseDelegate>(this.OnSetMatchAttributes), callback)); } return(result); }
internal Coroutine DropConnection(DropConnectionRequest req, NetworkMatch.BasicResponseDelegate callback) { Coroutine result; if (callback == null) { Debug.Log("callback supplied is null, aborting DropConnection Request."); result = null; } else { Uri uri = new Uri(this.baseUri, "/json/reply/DropConnectionRequest"); Debug.Log("MatchMakingClient DropConnection :" + uri); WWWForm wwwform = new WWWForm(); wwwform.AddField("version", Request.currentVersion); wwwform.AddField("projectId", Application.cloudProjectId); wwwform.AddField("sourceId", Utility.GetSourceID().ToString()); wwwform.AddField("accessTokenString", Utility.GetAccessTokenForNetwork(req.networkId).GetByteString()); wwwform.AddField("domain", req.domain); wwwform.AddField("networkId", req.networkId.ToString()); wwwform.AddField("nodeId", req.nodeId.ToString()); wwwform.headers["Accept"] = "application/json"; UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), wwwform); result = base.StartCoroutine(this.ProcessMatchResponse <DropConnectionResponse, NetworkMatch.BasicResponseDelegate>(client, new NetworkMatch.InternalResponseDelegate <DropConnectionResponse, NetworkMatch.BasicResponseDelegate>(this.OnDropConnection), callback)); } return(result); }
internal Coroutine DestroyMatch(DestroyMatchRequest req, NetworkMatch.BasicResponseDelegate callback) { bool flag = callback == null; Coroutine result; if (flag) { Debug.Log("callback supplied is null, aborting DestroyMatch Request."); result = null; } else { Uri uri = new Uri(this.baseUri, "/json/reply/DestroyMatchRequest"); string arg_40_0 = "MatchMakingClient Destroy :"; Uri expr_34 = uri; Debug.Log(arg_40_0 + ((expr_34 != null) ? expr_34.ToString() : null)); WWWForm wWWForm = new WWWForm(); wWWForm.AddField("version", Request.currentVersion); wWWForm.AddField("projectId", Application.cloudProjectId); wWWForm.AddField("sourceId", Utility.GetSourceID().ToString()); wWWForm.AddField("accessTokenString", Utility.GetAccessTokenForNetwork(req.networkId).GetByteString()); wWWForm.AddField("domain", req.domain); wWWForm.AddField("networkId", req.networkId.ToString()); wWWForm.headers["Accept"] = "application/json"; UnityWebRequest client = UnityWebRequest.Post(uri.ToString(), wWWForm); result = base.StartCoroutine(this.ProcessMatchResponse <BasicResponse, NetworkMatch.BasicResponseDelegate>(client, new NetworkMatch.InternalResponseDelegate <BasicResponse, NetworkMatch.BasicResponseDelegate>(this.OnMatchDestroyed), callback)); } return(result); }
public Coroutine DestroyMatch(NetworkID netId, int requestDomain, NetworkMatch.BasicResponseDelegate callback) { return(this.DestroyMatch(new DestroyMatchRequest { networkId = netId, domain = requestDomain }, callback)); }
internal void OnSetMatchAttributes(BasicResponse response, NetworkMatch.BasicResponseDelegate userCallback) { userCallback(response.success, response.extendedInfo); }
public Coroutine SetMatchAttributes(NetworkID networkId, bool isListed, int requestDomain, NetworkMatch.BasicResponseDelegate callback) { return(this.SetMatchAttributes(new SetMatchAttributesRequest { networkId = networkId, isListed = isListed, domain = requestDomain }, callback)); }
internal void OnDropConnection(DropConnectionResponse response, NetworkMatch.BasicResponseDelegate userCallback) { userCallback(response.success, response.extendedInfo); }
public Coroutine DropConnection(NetworkID netId, NodeID dropNodeId, int requestDomain, NetworkMatch.BasicResponseDelegate callback) { return(this.DropConnection(new DropConnectionRequest { networkId = netId, nodeId = dropNodeId, domain = requestDomain }, callback)); }
internal void OnMatchDestroyed(BasicResponse response, NetworkMatch.BasicResponseDelegate userCallback) { userCallback(response.success, response.extendedInfo); }