예제 #1
0
        /*
         * Receive an RPC reply from the remote Erlang node. This
         * convenience function receives a message from the remote node, and
         * expects it to have the following format:
         *
         * <pre>
         * {rex, Term}
         * </pre>
         *
         * @return the second element of the tuple if the received message
         * is a two-tuple, otherwise null. No further error checking is
         * performed.
         *
         * @exception C#.io.IOException if the connection is not active or
         * a communication error occurs.
         *
         * @exception Erlang.Exit if an exit signal is
         * received from a process on the peer node.
         *
         * @exception OtpAuthException if the remote node
         * sends a message containing an invalid cookie.
         **/
        public virtual Erlang.Object receiveRPC()
        {
            Erlang.Object msg = receive();
            Debug.WriteLine("receiveRPC: " + msg.ToString());

            return(AbstractConnection.decodeRPC(msg));
        }
예제 #2
0
파일: OtpMbox.cs 프로젝트: trompa/jungerl
        public Erlang.Object receiveRPC(int timeout)
        {
            Erlang.Object result = receive(timeout);

            if (result == null)
            {
                return(result);
            }
            else
            {
                Erlang.Object rpcReply = AbstractConnection.decodeRPC(result);
                return(rpcReply == null ? result : rpcReply);
            }
        }