private string GetNameServerAddress()
{
#if RHTTP
if (currentProtocol == ConnectionProtocol.RHttp)
{
return NameServerHttp;
}
#endif
ConnectionProtocol currentProtocol = this.UsedProtocol;
int protocolPort = 0;
ProtocolToNameServerPort.TryGetValue(currentProtocol, out protocolPort);
string protocolPrefix = string.Empty;
if (currentProtocol == ConnectionProtocol.WebSocket)
{
protocolPrefix = "ws://";
}
else if (currentProtocol == ConnectionProtocol.WebSocketSecure)
{
protocolPrefix = "wss://";
}
return string.Format("{0}{1}:{2}", protocolPrefix, NameServerHost, protocolPort);
}