/// <summary> /// Start server. /// </summary> public void Run() { Logger.Log("War World Infinity Server Version {0}", Version); Settings = new AppSettings(_directory + "Settings.ini"); _taskQueue = new TaskQueue(); CommandExec = new CommandExecuter(); //SocketPolicyServer.LoadAll(); SockServ = new WebSockServer(AppSettings.ServerPort); _netCommands = new NetworkCommands(); DB = new DataBase(AppSettings.DbServer, AppSettings.Database); DB.Connect(AppSettings.DbUsername, AppSettings.DbPassword); Worlds = new WorldManager(this); Structures = new StructureControl(); Chat = new ChatProcessor(); Users = new UserManager(); autoSaver = new AutoSave(); FCounter = new FrameCounter(); Alliances = new AllianceManager(); Squads = new SquadController(); Noise2D.RunAsync += TaskQueue.QeueAsync; _tickThread = new Thread(CommandExec.StartCommandLoop); _tickThread.Start(); GameLoop(); }
public Client() { InitializeComponent(); this.NetworkCommands = new NetworkCommands(); }
public void TestTrace() { Console.WriteLine(NetworkCommands.Tracert("192.168.1.99")); }
internal Message(NetworkCommands command) { this.command = command; }
void Awake() { instance = this; }
public Data(NetworkCommands _command, int _x, int _y) { command = _command; x = _x; y = _y; }
public CommandMessage(byte[] commandBytes) { this.CommandType = (NetworkCommands)BitConverter.ToInt32(commandBytes, 0); this.firstParam = BitConverter.ToInt32(commandBytes, 4); this.secondParam = BitConverter.ToInt32(commandBytes, 8); }
public CommandMessage(NetworkCommands _command, int _x = 0, int _y = 0) { CommandType = _command; firstParam = _x; secondParam = _y; }
void SendCommand(Socket s, NetworkCommands comand) { byte[] b = BitConverter.GetBytes((int)comand); s.Send(b, sizeof(Int32), SocketFlags.None); }