//--------------------------------------------------------------------- public int awriteData(string path, string data, zookeeper.stat_completion_t handler, int id = 0) { IntPtr idPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr))); Marshal.WriteInt32(idPtr, id); return(zookeeper.zoo_aset(mZookeeper, path, data, data.Length, -1, handler, idPtr)); }
//--------------------------------------------------------------------- public int aexists(string path, bool watch, zookeeper.stat_completion_t handler, int id = 0) { IntPtr idPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr))); Marshal.WriteInt32(idPtr, id); return(zookeeper.zoo_aexists(mZookeeper, path, watch ? ZK_CONST.ADD_WATCH : ZK_CONST.NOT_WATCH, handler, idPtr)); }