Inheritance: OtpErlangBitstr
Exemplo n.º 1
0
        public override Object Clone()
        {
            OtpErlangBinary that = (OtpErlangBinary)base.Clone();

            return(that);
        }
Exemplo n.º 2
0
        public static OtpErlangTuple Load(OtpMbox mbox, OtpErlangPid pid, string script)
        {
            OtpErlangObject body;
            OtpErlangBoolean debug = new OtpErlangBoolean(false);
            OtpErlangObject message;

            if (script.Length <= 65535)
            {
                body = new OtpErlangString(script);
            }
            else
            {
                body = new OtpErlangBinary(System.Text.Encoding.GetEncoding("iso-8859-1").GetBytes(script));
            }
            message = new OtpErlangTuple(new OtpErlangObject[] { mbox.Self, new OtpErlangAtom("load"), body, debug });

            mbox.send(pid, message);
            OtpErlangTuple reply = (OtpErlangTuple)mbox.receive();
            Console.WriteLine("Load: {0}", reply);

            return reply;
        }