private int FindChannelId(string extIp, string intIp)
{
List<ServerList.Entry> list = TNLobbyClient.knownServers.list;
int channelid = 0;
for (int i = 0; i < list.size; ++i)
{
ServerList.Entry ent = list[i];
if (intIp != ent.internalAddress.ToString() || extIp != ent.externalAddress.ToString()) continue;
channelid = i;
break;
}
Debug.Log(channelid + 1);
return channelid + 1;
}
private int NextChannelId()
{
int channelid = 0;
// List of discovered servers
List<ServerList.Entry> list = TNLobbyClient.knownServers.list;
for (int i = 0; i < 32; ++i)
{
try
{
if (string.IsNullOrEmpty(list[i].internalAddress.ToString())) continue;
}
catch (Exception)
{
channelid = i;
break;
}
}
Debug.Log(channelid + 1);
return channelid + 1;
}