Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Network Modifications

Network Modifications This forum is for modifications to the networking code of RunUO

Reply
 
Thread Tools Display Modes
Old 11-27-2007, 01:10 PM   #1 (permalink)
Forum Expert
 
RavonTUS's Avatar
 
Join Date: Aug 2004
Location: in a house.
Age: 39
Posts: 587
Send a message via ICQ to RavonTUS Send a message via AIM to RavonTUS
Default 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.

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
__________________

Will RunUO work on Linux? Yes
RavonTUS is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5