| | |
| | | return _tempNetPkgLst;
|
| | | }
|
| | |
|
| | | public static void WriteAllNetLog()
|
| | | public static void WriteAllNetLog(bool @details)
|
| | | {
|
| | | if (_typeLst != null)
|
| | | {
|
| | |
| | |
|
| | | var package = _typeLst[i];
|
| | | var line = string.Empty;
|
| | | line = StringUtility.Contact(package.NetPkgTp == NetPkgType.Client ? "【发送】" : "【接收】", package.SendOrGetTime, ":", package.GameNetName, "\r\n");
|
| | | if (package.fieldDetails != null)
|
| | | line = StringUtility.Contact(package.NetPkgTp == NetPkgType.Client ? "【发送】\t" : "【接收】\t", package.SendOrGetTime, ":", package.GameNetName, @details ? "\r\n" : "-->" + package.fields);
|
| | |
|
| | | if (@details && package.fieldDetails != null)
|
| | | {
|
| | | for (int j = 0; j < package.fieldDetails.Count; j++)
|
| | | {
|
| | |
| | | count++;
|
| | | }
|
| | |
|
| | | File.WriteAllLines(Application.dataPath + "/PackageLogs" + "_" + DateTime.Now.ToString("HH_mm_ss") + ".txt", lines.ToArray());
|
| | | File.WriteAllLines(Application.dataPath + "/PackageLogs_" + (@details ? "details" : "abstract") + "_" + DateTime.Now.ToString("HH_mm_ss") + ".txt", lines.ToArray());
|
| | | }
|
| | | }
|
| | | }
|