|
|
|
@ -28,7 +28,9 @@ namespace AksWebBrowser.Common
|
|
|
|
|
{ |
|
|
|
|
_serverUri = Parame.smWebsocket; |
|
|
|
|
_webSocket.ConnectAsync(new Uri(_serverUri), CancellationToken.None); |
|
|
|
|
ReceiveMessages(); SendHeartbeats(); |
|
|
|
|
Task.Delay(200).Wait(); |
|
|
|
|
ReceiveMessages(); |
|
|
|
|
SendHeartbeats(); |
|
|
|
|
} |
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
@ -103,6 +105,8 @@ namespace AksWebBrowser.Common
|
|
|
|
|
timer.Stop(); |
|
|
|
|
results = "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"keycode\":\"" + "aks100101" + "\",\"message\":\"fali\",\"code\":\"400\",\"status\":false,\"data\":\"" + "人证合一验证失败." + "\"}"; |
|
|
|
|
Parame.socket.Send(results); |
|
|
|
|
// 断开连接 |
|
|
|
|
_webSocket.Dispose(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -110,7 +114,6 @@ namespace AksWebBrowser.Common
|
|
|
|
|
} |
|
|
|
|
else if (functionName == "CF_FaceCompare") |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//停止活检 |
|
|
|
|
Send("{\"function\":\"CF_StopLiveDetect\"}", "CF_StopLiveDetect"); |
|
|
|
|
//关闭摄像头 |
|
|
|
@ -127,6 +130,8 @@ namespace AksWebBrowser.Common
|
|
|
|
|
} |
|
|
|
|
timer.Stop(); |
|
|
|
|
Parame.socket.Send(results); |
|
|
|
|
// 断开连接 |
|
|
|
|
_webSocket.Dispose(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|