private async void SendToServer(GPerfSession session, string logPath) { var result = await RemoteUtil.PostSessionAsync(m_URL, session.ToByteArray(), "application/x-protobuf"); /*{"message":"OK", * "uploadLogs":{ * "url":"http://hb.ix2.cn:8008/rog2/s3logs/client/1970/1/19/580fe550929721ef0c93f1e089f5c8fa.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20201027T103655Z&X-Amz-SignedHeaders=content-type%3Bhost%3Bx-amz-acl&X-Amz-Expires=600&X-Amz-Credential=test-key%2F20201027%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=a82e7cb10e469ea54da0fea1013878d9129777e3e60f55b28b9ca7951d331afa", * "method":"PUT", * "headers":{"x-amz-acl":"public-read","host":"hb.ix2.cn:8008","content-type":"application/gzip"}, * "compression":"GZIP", * "expires":1603795615}} */ if (!string.IsNullOrEmpty(result) && !string.IsNullOrEmpty(logPath) && File.Exists(logPath)) { Debug.Log($"{GPerfUtil.LOG_NAME}::SendToServer->Send Log to Server.result = {result}"); SendLogToServer(result, logPath); } }
public override void DoStart() { m_Session = new GPerfSession(); }