Beispiel #1
0
        public void Open()
        {
            var transport      = new AmqpTransport(endpoint);
            var clientProtocol = new AmqpProtocol(AmqpSecurity.Tls);

            Assert.True(transport.TryHandshake(clientProtocol, out var serverProtocol));

            var buffer = new byte[256];

            var frame = new OpenFrame(buffer);

            var containerId = Encoding.ASCII.GetBytes(Guid.NewGuid().ToString());

            frame.TryWrite(containerId, hostname: "" u8);
            frame.Send(transport);

            buffer.AsSpan().Clear();

            transport.Receive(buffer, out int read);

            transport.Close();
        }
Beispiel #2
0
        public void OpenFrame_Points_Sum()
        {
            var frame = new OpenFrame(3, 2);

            Assert.Equal(5, frame.Points);
        }