private void StopADBForward() { string adbPath = UnityDebugViewerWindowUtility.GetAdbPath(); UnityDebugViewerADBUtility.StopForwardProcess(adbPath); startForwardProcess = false; /// will abort process, should excute at last UnityDebugViewerTransferUtility.Clear(); }
private void CaptureLogThread(string info, string stacktrace, UnityEngine.LogType type) { if (transfer == null) { return; } lock (transfer) { /// 将收集到的log数据序列化成byte[] /// 并转发至连接到指定端口的tcp client socket var logData = new TransferLogData(info, stacktrace, type); byte[] sendData = UnityDebugViewerTransferUtility.StructToBytes(logData); transfer.SendData(sendData); } }
private void StartADBForward() { if (UnityDebugViewerWindowUtility.CheckADBStatus() == false) { return; } string adbPath = UnityDebugViewerWindowUtility.GetAdbPath(); startForwardProcess = UnityDebugViewerADBUtility.StartForwardProcess(pcPort, phonePort, adbPath); if (startForwardProcess) { int port = 0; if (int.TryParse(pcPort, out port)) { UnityDebugViewerTransferUtility.ConnectToServer("127.0.0.1", port); } } }
private void ReceiveDataFromServerHandler(byte[] data) { TransferLogData logData = UnityDebugViewerTransferUtility.BytesToStruct <TransferLogData>(data); AddTransferLog(logData); }