Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightAggregationTerminal
This commit is contained in:
commit
f11cb0f809
4 files changed
+17
-73
No files matched your search
+15
-2
@@ -19,8 +19,16 @@ namespace SunlightAggregationTerminal.Class
|
||||
{
|
||||
string[] parts = ip.Split('/');
|
||||
|
||||
DataReceived.ServerIP = parts[0];
|
||||
DataReceived.ServerURL = parts[1];
|
||||
if (parts.Length >= 2)
|
||||
{
|
||||
DataReceived.ServerIP = parts[0];
|
||||
DataReceived.ServerURL = parts[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
DataReceived.ServerIP = "";
|
||||
DataReceived.ServerURL = "";
|
||||
}
|
||||
DataReceived.ServerName = Name;
|
||||
DataReceived.ServerPassword = Password;
|
||||
DataReceived.ServerTerminal = Terminal;
|
||||
@@ -71,6 +79,11 @@ namespace SunlightAggregationTerminal.Class
|
||||
});*/
|
||||
#endregion
|
||||
|
||||
if (httpclient.Online)//是否重置客户端
|
||||
{
|
||||
await httpclient.CloseAsync();
|
||||
}
|
||||
|
||||
//配置config
|
||||
await httpclient.SetupAsync(config);
|
||||
//连接
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ namespace SunlightAggregationTerminal.Class
|
||||
{
|
||||
await tcpClient.SetupAsync(new TouchSocketConfig()
|
||||
.SetSingleStreamDataHandlingAdapter(() => new PeriodPackageAdapter())//以超时周期和包
|
||||
.SetRemoteIPHost(ip)
|
||||
.SetRemoteIPHost(ip)
|
||||
.ConfigurePlugins(a =>
|
||||
{
|
||||
a.UseReconnection<TouchSocket.Sockets.TcpClient>(options =>
|
||||
|
||||
Reference in new issue
Block a user