Esempio n. 1
0
 public void PrepareTCPServer(Action <string> action, string shardingType)
 {
     this.afterGetTcpShardingStringAction = action;
     GameWebAPI.RespData_GetTcpShardingString data    = null;
     GameWebAPI.GetTcpShardingString          request = new GameWebAPI.GetTcpShardingString
     {
         SetSendData = delegate(GameWebAPI.ReqData_GetTcpShardingString param)
         {
             param.type = shardingType;
         },
         OnReceived = delegate(GameWebAPI.RespData_GetTcpShardingString response)
         {
             data = response;
         }
     };
     base.StartCoroutine(request.Run(delegate()
     {
         RestrictionInput.EndLoad();
         this.hostAddress = data.server;
         global::Debug.Log("接続先TCPサーバは「" + this.hostAddress + "」です");
         if (this.afterGetTcpShardingStringAction != null)
         {
             this.afterGetTcpShardingStringAction(data.server);
         }
     }, null, null));
     this.parameter = new Dictionary <string, object>();
     this.parameter.Add("X-AppVer", WebAPIPlatformValue.GetAppVersion());
     this.header = new Dictionary <string, object>();
     this.header.Add("headers", this.parameter);
 }
Esempio n. 2
0
 public void SetTcpShardingString(GameWebAPI.RespData_GetTcpShardingString data)
 {
     this.hostAddress = data.server;
     global::Debug.Log("接続先TCPサーバは「" + this.hostAddress + "」です");
 }