private static void OnLeave(IntPtr csObj) { GCHandle h = GCHandle.FromIntPtr(csObj); CppTcpClient obj = h.Target as CppTcpClient; if (obj) { obj.WaitClose(); } }
private static void OnMsg(IntPtr csObj, IntPtr pStream) { GCHandle h = GCHandle.FromIntPtr(csObj); CppTcpClient obj = h.Target as CppTcpClient; if (obj) { obj.OnMsg(pStream); } }