public LCM(params string[] urls)
{
if (urls.Length == 0)
{
string env = Environment.GetEnvironmentVariable("LCM_DEFAULT_URL");
if (env == null)
{
urls = new string[] { "udpm://239.255.76.67:7667" };
}
else
{
urls = new string[] { env };
}
}
foreach (string url in urls)
{
URLParser up = new URLParser(url);
string protocol = up.Get("protocol");
if (protocol.Equals("udpm"))
{
providers.Add(new UDPMulticastProvider(this, up));
}
else if (protocol.Equals("tcpq"))
{
providers.Add(new TCPProvider(this, up));
}/*
else if (protocol.Equals("file"))
{
providers.Add(new LogFileProvider(this, up));
}*/
else
{
Console.Error.WriteLine("LCM: Unknown URL protocol: " + protocol);
}
}
}