Beispiel #1
0
        /// <summary>
        /// Write a new style (R6 and later) Erlang ref to the stream
        /// </summary>
        public void WriteRef(ErlRef r)
        {
            Debug.Assert(r != ErlRef.Null);
            Debug.Assert(r.Ids.Length == 3);
            int arity = (int)(r.Ids.Length);

            // r6 ref
            write(ErlExternalTag.NewRef);

            // how many id values
            Write2BE(arity);

            WriteAtom(r.Node);

            // note: creation BEFORE id in r6 ref
            Write1(r.Creation & 0x3); // 2 bits

            // first int gets truncated to 18 bits
            Write4BE(r.Ids[0]);
            Write4BE(r.Ids[1]);
            Write4BE(r.Ids[2]);
        }
Beispiel #2
0
 public void Down(ErlRef eref, ErlPid pid, ErlAtom reason)
 {
     // TODO
     throw new NotImplementedException();
 }
Beispiel #3
0
 internal static ErlMsg MonitorPexit(IErlObject from, ErlPid dest, ErlRef eref, IErlObject reason)
 {
     return(new ErlMsg(Tag.MonitorPexit, from, dest, eref: eref, reason: reason));
 }
Beispiel #4
0
 public ErlDown(ErlRef eref, ErlPid pid, IErlObject reason)
     : base(pid, reason)
 {
     Ref = eref;
 }
Beispiel #5
0
 internal static ErlMsg DemonitorP(ErlPid from, IErlObject /* Pid or Atom */ dest, ErlRef eref)
 {
     return(new ErlMsg(Tag.DemonitorP, from, dest, eref: eref));
 }