diff --git a/RTM/Source/Public/AVRealtime.cs b/RTM/Source/Public/AVRealtime.cs
index cd6360d..49bd9ec 100644
--- a/RTM/Source/Public/AVRealtime.cs
+++ b/RTM/Source/Public/AVRealtime.cs
@@ -409,18 +409,6 @@ namespace LeanCloud.Realtime
/// 登录的时候告知服务器,本次登录所使用的离线消息策略
///
public OfflineMessageStrategy OfflineMessageStrategy { get; set; }
-
- ///
- /// Gets or sets the realtime server.
- ///
- /// The realtime server.
- public Uri RealtimeServer { get; set; }
-
- ///
- /// Gets or sets the push router server.
- ///
- /// The push router server.
- public Uri RTMRouter { get; set; }
}
///
@@ -1086,26 +1074,26 @@ namespace LeanCloud.Realtime
return Task.FromResult(true);
}
- if (CurrentConfiguration.RealtimeServer != null)
+ if (AVClient.CurrentConfiguration.RealtimeServer != null)
{
- _wss = CurrentConfiguration.RealtimeServer.ToString();
+ _wss = AVClient.CurrentConfiguration.RealtimeServer;
AVRealtime.PrintLog("use configuration realtime server with url: " + _wss);
return OpenAsync(_wss, subprotocol, enforce);
}
- var routerUrl = CurrentConfiguration.RTMRouter != null ? CurrentConfiguration.RTMRouter.ToString() : null;
+ var routerUrl = AVClient.CurrentConfiguration.RTMServer;
return RouterController.GetAsync(routerUrl, secure, cancellationToken).OnSuccess(r =>
+ {
+ var routerState = r.Result;
+ if (routerState == null)
{
- var routerState = r.Result;
- if (routerState == null)
- {
- return Task.FromResult(false);
- }
- _wss = routerState.server;
- _secondaryWss = routerState.secondary;
- state = Status.Connecting;
- AVRealtime.PrintLog("push router give a url :" + _wss);
- return OpenAsync(routerState.server, subprotocol, enforce);
- }).Unwrap();
+ return Task.FromResult(false);
+ }
+ _wss = routerState.server;
+ _secondaryWss = routerState.secondary;
+ state = Status.Connecting;
+ AVRealtime.PrintLog("push router give a url :" + _wss);
+ return OpenAsync(routerState.server, subprotocol, enforce);
+ }).Unwrap();
}
///
@@ -1136,7 +1124,7 @@ namespace LeanCloud.Realtime
///
public Task>> RunCommandAsync(AVIMCommand command)
{
- command.AppId(this.CurrentConfiguration.ApplicationId);
+ command.AppId(AVClient.CurrentConfiguration.ApplicationId);
return this.AVIMCommandRunner.RunCommandAsync(command);
}
@@ -1146,7 +1134,7 @@ namespace LeanCloud.Realtime
///
public void RunCommand(AVIMCommand command)
{
- command.AppId(this.CurrentConfiguration.ApplicationId);
+ command.AppId(AVClient.CurrentConfiguration.ApplicationId);
this.AVIMCommandRunner.RunCommand(command);
}
diff --git a/Storage/Source/Public/AVClient.cs b/Storage/Source/Public/AVClient.cs
index 825b791..a4308c9 100644
--- a/Storage/Source/Public/AVClient.cs
+++ b/Storage/Source/Public/AVClient.cs
@@ -102,7 +102,7 @@ namespace LeanCloud
///
/// The LeanCloud application ID of your app.
///
- public String ApplicationId { get; set; }
+ public string ApplicationId { get; set; }
///
/// LeanCloud C# SDK 支持的服务节点,目前支持华北,华东和北美公有云节点和私有节点,以及专属节点
@@ -120,13 +120,13 @@ namespace LeanCloud
///
/// The LeanCloud application key for your app.
///
- public String ApplicationKey { get; set; }
+ public string ApplicationKey { get; set; }
///
/// The LeanCloud master key for your app.
///
/// The master key.
- public String MasterKey { get; set; }
+ public string MasterKey { get; set; }
///
/// Gets or sets additional HTTP headers to be sent with network requests from the SDK.
@@ -139,28 +139,31 @@ namespace LeanCloud
public VersionInformation VersionInfo { get; set; }
///
- /// Gets or sets the engine server uri. The Uri must have no path port.
- /// If this property is set, all LeanEngine cloud func calls will use this server as LeanEngine server.
- ///
- /// The engine server uri.
- public Uri EngineServer { get; set; }
-
- ///
- /// Gets or sets the API server.
+ /// 存储服务器地址
///
/// The API server.
- public Uri ApiServer { get; set; }
+ public string ApiServer { get; set; }
///
- /// Gets or sets the push server.
+ /// 云引擎服务器地址
///
- /// The push server.
+ /// The engine server uri.
+ public string EngineServer { get; set; }
+
+ ///
+ /// 即时通信服务器地址
+ ///
+ /// The RTMR outer.
+ public string RTMServer { get; set; }
+
+ ///
+ /// 直连即时通信服务器地址
+ ///
+ /// The realtime server.
+ public string RealtimeServer { get; set; }
+
public Uri PushServer { get; set; }
- ///
- /// Gets or sets the stats server.
- ///
- /// The stats server.
public Uri StatsServer { get; set; }
}