Listener.Port to IPEndPoint[]
Greetings,
With the recent SVN 264 change, Listener.Port was changed to IPEndPoint[] m_EndPoints, so it could read other ports than just 2593.
I am trying to fix a script that used Listern.Port and would like to know how to change it to do the range, instead of erroring out.
What I think I need, but is wrong due to my lack of knowledge...
Any suggestions or hints?
-Ravon
Greetings,
With the recent SVN 264 change, Listener.Port was changed to IPEndPoint[] m_EndPoints, so it could read other ports than just 2593.
I am trying to fix a script that used Listern.Port and would like to know how to change it to do the range, instead of erroring out.
Code:
if (((IPEndPoint)from.Socket.LocalEndPoint).Port != Listener.Port)
{
//Do Stuff Here
}
What I think I need, but is wrong due to my lack of knowledge...
Code:
IPEndPoint[] ipep = Listener.EndPoints;
m_Listeners = new Listener[ipep.Length];
bool success = false;
do
{
for (int i = 0; i < ipep.Length; i++)
{
if (((IPEndPoint)from.Socket.LocalEndPoint).Port != ipep.Length)
{
//Do Stuff Here
return;
}
}
if (!success)
{
Console.WriteLine("Retrying...");
Thread.Sleep(10000);
}
} while (!success);
Any suggestions or hints?
-Ravon