public ConnectionListener(Uri addressUri, string userInfo, IContainer container)
: base()
{
this.connections = new HashSet<Connection>();
this.container = container;
string userName = null;
string password = null;
if (userInfo != null)
{
string[] creds = userInfo.Split(':');
if (creds.Length != 2)
{
throw new ArgumentException("userInfo");
}
userName = Uri.UnescapeDataString(creds[0]);
password = creds.Length == 1 ? string.Empty : Uri.UnescapeDataString(creds[1]);
}
this.address = new Address(addressUri.Host, addressUri.Port, userName, password, addressUri.AbsolutePath, addressUri.Scheme);
}