/// <summary> /// 结束数据收集 /// </summary> public static void End() { GameObject go = Common.go; LuaProfiler profiler = go.GetComponent <LuaProfiler> (); if (profiler == null || !profiler.enabled) { return; } profiler.enabled = false; if (s_isUDP) { if (s_udp != null) { s_udp.Close(); } } else { if (s_tcp != null) { s_tcp.Close(); } } s_luaEnd.BeginPCall(); s_luaEnd.PCall(); s_luaEnd.EndPCall(); Debug.Log("Lua Profiler - Stopped!"); }
static int Close(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); ShibaInu.TcpSocket obj = (ShibaInu.TcpSocket)ToLua.CheckObject <ShibaInu.TcpSocket>(L, 1); obj.Close(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }