Beispiel #1
0
 public APIServer()
 {
     clientMap       = new Dictionary <int, APIClient>();
     clientAccepter  = new ClientAccepter(this);
     requestListDict = new Dictionary <Object, List <Request> >();
     CommandManager  = new CommandManager(this);
 }
Beispiel #2
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 #3
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));
        }