in src/Listener/ConnectionListener.cs [147:188]
public void Open()
{
if (this.closed)
{
throw new ObjectDisposedException(this.GetType().Name);
}
TransportProvider provider;
if (this.container.CustomTransports.TryGetValue(this.address.Scheme, out provider))
{
this.listener = new CustomTransportListener(this, provider);
}
else if (this.address.Scheme.Equals(Address.Amqp, StringComparison.OrdinalIgnoreCase))
{
this.listener = new TcpTransportListener(this, this.address.Host, this.address.Port);
}
else if (this.address.Scheme.Equals(Address.Amqps, StringComparison.OrdinalIgnoreCase))
{
this.listener = new TlsTransportListener(this, this.address.Host, this.address.Port, this.GetServiceCertificate());
}
#if NETFX
else if (this.address.Scheme.Equals(WebSocketTransport.WebSockets, StringComparison.OrdinalIgnoreCase))
{
this.listener = new WebSocketTransportListener(this, "HTTP", this.address.Host, address.Port, address.Path);
}
else if (this.address.Scheme.Equals(WebSocketTransport.SecureWebSockets, StringComparison.OrdinalIgnoreCase))
{
this.listener = new WebSocketTransportListener(this, "HTTPS", this.address.Host, address.Port, address.Path);
}
#endif
else
{
throw new NotSupportedException(this.address.Scheme);
}
if (this.address.User != null)
{
this.SASL.EnablePlainMechanism(this.address.User, this.address.Password);
}
this.listener.Open();
}