Beispiel #1
0
        public WorldServerWindow(ClientAccepter clientAccepter, MasterServerLink msLink)
        {
            InitializeComponent();

            msLink.StateChanged += OnStateChange_MasterServerLink;

            this.instHost = new InstanceServerHost(clientAccepter, msLink);
            this.instHost.Start();

            button_RefreshList_Click(null, null);
            button_RefreshPlayerList_Click(null, null);
        }
Beispiel #2
0
        static void Main()
        {
            //MasterServerLink
            IPEndPoint       msLink_hostLocal       = new IPEndPoint(IPAddress.Loopback, 4000);
            IPAddress        msLink_expectedAddress = IPAddress.Loopback;
            MasterServerLink msLink = new MasterServerLink(msLink_hostLocal, msLink_expectedAddress);

            //ClientAcceptor
            IPEndPoint     clientAcceptor_hostLocal = new IPEndPoint(IPAddress.Loopback, 5000);
            ClientAccepter clientAcceptor           = new ClientAccepter(clientAcceptor_hostLocal);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new InstanceServerHostWindow(clientAcceptor, msLink));
        }
 public InstanceServerHost(ClientAccepter clientAccepter, MasterServerLink masterServerLink)
     : base("InstServHost")
 {
     this.clientAccepter   = clientAccepter;
     this.masterServerLink = masterServerLink;
 }