Esempio n. 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));
        }
Esempio n. 2
0
        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);
            }
        }