connect() public method

public connect ( Erlang.NET.OtpPeer other ) : OtpConnection
other Erlang.NET.OtpPeer
return OtpConnection
        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());
        }
 /// <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);
 }