示例#1
0
        /// <summary>Creates the connection.</summary>
        /// <returns>The Erlang.NET.OtpConnection.</returns>
        public OtpConnection CreateConnection()
        {
            var self = new OtpSelf("rabbit-monitor-" + counter++);
            var peer = new OtpPeer(NODE_NAME);

            return(self.connect(peer));
        }
示例#2
0
        public void TestRawApi()
        {
            var self = new OtpSelf("rabbit-monitor");

            var hostName = NODE_NAME;
            var peer     = new OtpPeer(hostName);

            this.connection = self.connect(peer);

            var encoding = new UTF8Encoding();

            OtpErlangObject[] objectArray = { new OtpErlangBinary(encoding.GetBytes("/")) };

            this.connection.sendRPC("rabbit_amqqueue", "info_all", new OtpErlangList(objectArray));

            var received = this.connection.receiveRPC();

            Logger.Info(received);
            Logger.Info(received.GetType().ToString());
        }