|
|
|
|
@ -116,6 +116,7 @@ namespace AksWebBrowser.Common
|
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
int timeout = 0; |
|
|
|
|
byte[] messageBytes = Encoding.UTF8.GetBytes(message); |
|
|
|
|
byte[] header = BitConverter.GetBytes(messageBytes.Length); |
|
|
|
|
byte[] data = new byte[header.Length + messageBytes.Length]; |
|
|
|
|
@ -126,6 +127,11 @@ namespace AksWebBrowser.Common
|
|
|
|
|
while (string.IsNullOrEmpty(jsonstr) && Parame.tcpClient != null) |
|
|
|
|
{ |
|
|
|
|
Task.Delay(10).Wait(); |
|
|
|
|
timeout = timeout + 10; |
|
|
|
|
if (timeout > 5000) |
|
|
|
|
{ |
|
|
|
|
jsonstr = MainModel.str2Base64("{\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"data\":\"" + "获取数据超时!" + "\"}"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (string.IsNullOrEmpty(jsonstr)) |
|
|
|
|
{ |
|
|
|
|
|