public async Task ListenerTcpTest() { string address = "amqp://localhost:5676"; AmqpConnectionListener listener = new AmqpConnectionListener(address, new TestRuntimeProvider()); listener.Open(); try { await RunClientAsync(address); } finally { listener.Close(); } }
public async Task ListenerSaslTlsTest() { string address = "amqps://*****:*****@localhost:5676"; AmqpSettings settings = AmqpUtils.GetAmqpSettings(false, "localhost", false, new SaslPlainHandler(new TestSaslPlainAuthenticator())); AmqpConnectionSettings connectionSettings = AmqpUtils.GetConnectionSettings(32 * 1024); settings.RuntimeProvider = new TestRuntimeProvider(); AmqpConnectionListener listener = new AmqpConnectionListener(new[] { address }, settings, connectionSettings); listener.Open(); try { await RunClientAsync(address); } finally { listener.Close(); } }